From 41af1fe1b9a29635797d84976b8537e1989395ff Mon Sep 17 00:00:00 2001 From: Mobsuccess Bot Date: Mon, 5 Jun 2023 00:32:39 +0000 Subject: [PATCH] Run updater mobsuccess-devops/policy-github-updater-npm --- node_modules/.bin/atob | 1 - node_modules/.bin/escodegen | 1 - node_modules/.bin/esgenerate | 1 - node_modules/.bin/is-ci | 1 - node_modules/.bin/is-docker | 1 - node_modules/.bin/jest-runtime | 1 - node_modules/.bin/resolve | 1 + node_modules/.bin/sane | 1 - node_modules/.bin/sshpk-conv | 1 - node_modules/.bin/sshpk-sign | 1 - node_modules/.bin/sshpk-verify | 1 - node_modules/.bin/update-browserslist-db | 1 + node_modules/.bin/uuid | 1 - node_modules/.bin/watch | 1 - node_modules/.package-lock.json | 4575 ++++ .../remapping}/LICENSE | 0 node_modules/@ampproject/remapping/README.md | 218 + .../@ampproject/remapping/dist/remapping.mjs | 191 + .../remapping/dist/remapping.mjs.map | 1 + .../remapping/dist/remapping.umd.js | 196 + .../remapping/dist/remapping.umd.js.map | 1 + .../dist/types/build-source-map-tree.d.ts | 14 + .../remapping/dist/types/remapping.d.ts | 19 + .../remapping/dist/types/source-map-tree.d.ts | 42 + .../remapping/dist/types/source-map.d.ts | 17 + .../remapping/dist/types/types.d.ts | 14 + .../@ampproject/remapping/package.json | 75 + node_modules/@babel/compat-data/README.md | 19 + .../@babel/compat-data/corejs2-built-ins.js | 1 + .../compat-data/corejs3-shipped-proposals.js | 1 + .../compat-data/data/corejs2-built-ins.json | 374 +- .../data/corejs3-shipped-proposals.json | 4 +- .../compat-data/data/overlapping-plugins.json | 6 +- .../compat-data/data/plugin-bugfixes.json | 157 +- .../@babel/compat-data/data/plugins.json | 286 +- node_modules/@babel/compat-data/package.json | 73 +- node_modules/@babel/core/cjs-proxy.cjs | 51 + .../@babel/core/lib/config/cache-contexts.js | 3 + .../core/lib/config/cache-contexts.js.map | 1 + .../@babel/core/lib/config/caching.js | 88 +- .../@babel/core/lib/config/caching.js.map | 1 + .../@babel/core/lib/config/config-chain.js | 173 +- .../core/lib/config/config-chain.js.map | 1 + .../core/lib/config/config-descriptors.js | 79 +- .../core/lib/config/config-descriptors.js.map | 1 + .../core/lib/config/files/configuration.js | 336 +- .../lib/config/files/configuration.js.map | 1 + .../lib/config/files/import-meta-resolve.js | 17 + .../config/files/import-meta-resolve.js.map | 1 + .../@babel/core/lib/config/files/import.cjs | 6 + .../core/lib/config/files/import.cjs.map | 1 + .../@babel/core/lib/config/files/import.js | 10 - .../core/lib/config/files/index-browser.js | 27 +- .../lib/config/files/index-browser.js.map | 1 + .../@babel/core/lib/config/files/index.js | 35 +- .../@babel/core/lib/config/files/index.js.map | 1 + .../core/lib/config/files/module-types.js | 169 +- .../core/lib/config/files/module-types.js.map | 1 + .../@babel/core/lib/config/files/package.js | 73 +- .../core/lib/config/files/package.js.map | 1 + .../@babel/core/lib/config/files/plugins.js | 259 +- .../core/lib/config/files/plugins.js.map | 1 + .../@babel/core/lib/config/files/types.js | 3 + .../@babel/core/lib/config/files/types.js.map | 1 + .../@babel/core/lib/config/files/utils.js | 30 +- .../@babel/core/lib/config/files/utils.js.map | 1 + node_modules/@babel/core/lib/config/full.js | 208 +- .../@babel/core/lib/config/full.js.map | 1 + .../core/lib/config/helpers/config-api.js | 60 +- .../core/lib/config/helpers/config-api.js.map | 1 + .../core/lib/config/helpers/deep-array.js | 23 + .../core/lib/config/helpers/deep-array.js.map | 1 + .../core/lib/config/helpers/environment.js | 6 +- .../lib/config/helpers/environment.js.map | 1 + node_modules/@babel/core/lib/config/index.js | 56 +- .../@babel/core/lib/config/index.js.map | 1 + node_modules/@babel/core/lib/config/item.js | 27 +- .../@babel/core/lib/config/item.js.map | 1 + .../@babel/core/lib/config/partial.js | 66 +- .../@babel/core/lib/config/partial.js.map | 1 + .../core/lib/config/pattern-to-regex.js | 23 +- .../core/lib/config/pattern-to-regex.js.map | 1 + node_modules/@babel/core/lib/config/plugin.js | 11 +- .../@babel/core/lib/config/plugin.js.map | 1 + .../@babel/core/lib/config/printer.js | 41 +- .../@babel/core/lib/config/printer.js.map | 1 + .../lib/config/resolve-targets-browser.js | 39 +- .../lib/config/resolve-targets-browser.js.map | 1 + .../@babel/core/lib/config/resolve-targets.js | 53 +- .../core/lib/config/resolve-targets.js.map | 1 + node_modules/@babel/core/lib/config/util.js | 10 +- .../@babel/core/lib/config/util.js.map | 1 + .../config/validation/option-assertions.js | 123 +- .../validation/option-assertions.js.map | 1 + .../core/lib/config/validation/options.js | 63 +- .../core/lib/config/validation/options.js.map | 1 + .../core/lib/config/validation/plugins.js | 15 +- .../core/lib/config/validation/plugins.js.map | 1 + .../core/lib/config/validation/removed.js | 5 +- .../core/lib/config/validation/removed.js.map | 1 + .../@babel/core/lib/errors/config-error.js | 18 + .../core/lib/errors/config-error.js.map | 1 + .../core/lib/errors/rewrite-stack-trace.js | 97 + .../lib/errors/rewrite-stack-trace.js.map | 1 + .../@babel/core/lib/gensync-utils/async.js | 66 +- .../core/lib/gensync-utils/async.js.map | 1 + .../@babel/core/lib/gensync-utils/fs.js | 51 +- .../@babel/core/lib/gensync-utils/fs.js.map | 1 + .../core/lib/gensync-utils/functional.js | 33 + .../core/lib/gensync-utils/functional.js.map | 1 + node_modules/@babel/core/lib/index.js | 167 +- node_modules/@babel/core/lib/index.js.map | 1 + node_modules/@babel/core/lib/parse.js | 54 +- node_modules/@babel/core/lib/parse.js.map | 1 + node_modules/@babel/core/lib/parser/index.js | 28 +- .../@babel/core/lib/parser/index.js.map | 1 + .../lib/parser/util/missing-plugin-helper.js | 370 +- .../parser/util/missing-plugin-helper.js.map | 1 + .../core/lib/tools/build-external-helpers.js | 111 +- .../lib/tools/build-external-helpers.js.map | 1 + node_modules/@babel/core/lib/transform-ast.js | 57 +- .../@babel/core/lib/transform-ast.js.map | 1 + .../@babel/core/lib/transform-file-browser.js | 14 +- .../core/lib/transform-file-browser.js.map | 1 + .../@babel/core/lib/transform-file.js | 47 +- .../@babel/core/lib/transform-file.js.map | 1 + node_modules/@babel/core/lib/transform.js | 58 +- node_modules/@babel/core/lib/transform.js.map | 1 + .../lib/transformation/block-hoist-plugin.js | 94 +- .../transformation/block-hoist-plugin.js.map | 1 + .../core/lib/transformation/file/file.js | 90 +- .../core/lib/transformation/file/file.js.map | 1 + .../core/lib/transformation/file/generate.js | 59 +- .../lib/transformation/file/generate.js.map | 1 + .../core/lib/transformation/file/merge-map.js | 248 +- .../lib/transformation/file/merge-map.js.map | 1 + .../@babel/core/lib/transformation/index.js | 57 +- .../core/lib/transformation/index.js.map | 1 + .../core/lib/transformation/normalize-file.js | 111 +- .../lib/transformation/normalize-file.js.map | 1 + .../core/lib/transformation/normalize-opts.js | 23 +- .../lib/transformation/normalize-opts.js.map | 1 + .../core/lib/transformation/plugin-pass.js | 24 +- .../lib/transformation/plugin-pass.js.map | 1 + .../transformation/util/clone-deep-browser.js | 25 - .../lib/transformation/util/clone-deep.js | 40 +- .../lib/transformation/util/clone-deep.js.map | 1 + .../core/lib/vendor/import-meta-resolve.js | 1012 + .../lib/vendor/import-meta-resolve.js.map | 1 + .../@babel/code-frame/lib/index.js | 35 +- .../@babel/code-frame/lib/index.js.map | 1 + .../@babel/code-frame/package.json | 63 +- .../node_modules/convert-source-map/LICENSE | 23 + .../node_modules/convert-source-map/README.md | 123 + .../node_modules/convert-source-map/index.js | 179 + .../convert-source-map/package.json | 41 + .../core/node_modules/source-map/CHANGELOG.md | 301 - .../core/node_modules/source-map/LICENSE | 28 - .../core/node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 --- .../source-map/dist/source-map.js | 3090 --- .../source-map/dist/source-map.min.js | 2 - .../source-map/dist/source-map.min.js.map | 1 - .../node_modules/source-map/lib/array-set.js | 121 - .../node_modules/source-map/lib/base64-vlq.js | 140 - .../node_modules/source-map/lib/base64.js | 67 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../core/node_modules/source-map/lib/util.js | 417 - .../core/node_modules/source-map/package.json | 211 - .../node_modules/source-map/source-map.js | 8 - node_modules/@babel/core/package.json | 143 +- .../core/src/config/files/index-browser.js | 96 - .../core/src/config/files/index-browser.ts | 109 + .../@babel/core/src/config/files/index.js | 31 - .../@babel/core/src/config/files/index.ts | 29 + .../src/config/resolve-targets-browser.js | 33 - .../src/config/resolve-targets-browser.ts | 40 + .../@babel/core/src/config/resolve-targets.js | 49 - .../@babel/core/src/config/resolve-targets.ts | 56 + .../@babel/core/src/transform-file-browser.js | 29 - .../@babel/core/src/transform-file-browser.ts | 31 + .../@babel/core/src/transform-file.js | 40 - .../@babel/core/src/transform-file.ts | 55 + .../transformation/util/clone-deep-browser.js | 19 - .../src/transformation/util/clone-deep.js | 9 - node_modules/@babel/generator/lib/buffer.js | 414 +- .../@babel/generator/lib/buffer.js.map | 1 + .../@babel/generator/lib/generators/base.js | 84 +- .../generator/lib/generators/base.js.map | 1 + .../generator/lib/generators/classes.js | 135 +- .../generator/lib/generators/classes.js.map | 1 + .../generator/lib/generators/expressions.js | 284 +- .../lib/generators/expressions.js.map | 1 + .../@babel/generator/lib/generators/flow.js | 405 +- .../generator/lib/generators/flow.js.map | 1 + .../@babel/generator/lib/generators/index.js | 26 +- .../generator/lib/generators/index.js.map | 1 + .../@babel/generator/lib/generators/jsx.js | 92 +- .../generator/lib/generators/jsx.js.map | 1 + .../generator/lib/generators/methods.js | 188 +- .../generator/lib/generators/methods.js.map | 1 + .../generator/lib/generators/modules.js | 239 +- .../generator/lib/generators/modules.js.map | 1 + .../generator/lib/generators/statements.js | 261 +- .../lib/generators/statements.js.map | 1 + .../lib/generators/template-literals.js | 17 +- .../lib/generators/template-literals.js.map | 1 + .../@babel/generator/lib/generators/types.js | 163 +- .../generator/lib/generators/types.js.map | 1 + .../generator/lib/generators/typescript.js | 476 +- .../lib/generators/typescript.js.map | 1 + node_modules/@babel/generator/lib/index.js | 55 +- .../@babel/generator/lib/index.js.map | 1 + .../@babel/generator/lib/node/index.js | 83 +- .../@babel/generator/lib/node/index.js.map | 1 + .../@babel/generator/lib/node/parentheses.js | 270 +- .../generator/lib/node/parentheses.js.map | 1 + .../@babel/generator/lib/node/whitespace.js | 195 +- .../generator/lib/node/whitespace.js.map | 1 + node_modules/@babel/generator/lib/printer.js | 714 +- .../@babel/generator/lib/printer.js.map | 1 + .../@babel/generator/lib/source-map.js | 127 +- .../@babel/generator/lib/source-map.js.map | 1 + .../node_modules/source-map/CHANGELOG.md | 301 - .../generator/node_modules/source-map/LICENSE | 28 - .../node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 --- .../source-map/dist/source-map.js | 3090 --- .../source-map/dist/source-map.min.js | 2 - .../source-map/dist/source-map.min.js.map | 1 - .../node_modules/source-map/lib/array-set.js | 121 - .../node_modules/source-map/lib/base64-vlq.js | 140 - .../node_modules/source-map/lib/base64.js | 67 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../node_modules/source-map/lib/util.js | 417 - .../node_modules/source-map/package.json | 211 - .../node_modules/source-map/source-map.js | 8 - node_modules/@babel/generator/package.json | 82 +- .../helper-compilation-targets/README.md | 19 + .../helper-compilation-targets/lib/debug.js | 15 +- .../lib/debug.js.map | 1 + .../lib/filter-items.js | 39 +- .../lib/filter-items.js.map | 1 + .../helper-compilation-targets/lib/index.js | 172 +- .../lib/index.js.map | 1 + .../helper-compilation-targets/lib/options.js | 8 +- .../lib/options.js.map | 1 + .../helper-compilation-targets/lib/pretty.js | 27 +- .../lib/pretty.js.map | 1 + .../helper-compilation-targets/lib/targets.js | 7 +- .../lib/targets.js.map | 1 + .../helper-compilation-targets/lib/utils.js | 53 +- .../lib/utils.js.map | 1 + .../node_modules/lru-cache}/LICENSE | 0 .../node_modules/lru-cache/README.md | 166 + .../node_modules/lru-cache/index.js | 334 + .../node_modules/lru-cache/package.json | 32 + .../node_modules/yallist}/LICENSE | 0 .../node_modules/yallist/README.md | 204 + .../node_modules/yallist/iterator.js | 8 + .../node_modules/yallist/package.json | 29 + .../node_modules/yallist/yallist.js | 426 + .../helper-compilation-targets/package.json | 86 +- .../LICENSE | 0 .../helper-environment-visitor/README.md | 19 + .../helper-environment-visitor/lib/index.js | 56 + .../lib/index.js.map | 1 + .../helper-environment-visitor/package.json | 29 + .../@babel/helper-function-name/README.md | 4 +- .../@babel/helper-function-name/lib/index.js | 110 +- .../helper-function-name/lib/index.js.map | 1 + .../@babel/helper-function-name/package.json | 59 +- .../helper-get-function-arity/README.md | 19 - .../helper-get-function-arity/lib/index.js | 26 - .../helper-get-function-arity/package.json | 48 - .../LICENSE | 0 .../@babel/helper-hoist-variables/README.md | 19 + .../helper-hoist-variables/lib/index.js | 58 + .../helper-hoist-variables/package.json | 28 + .../README.md | 19 - .../lib/index.js | 403 - .../lib/index.js.map | 1 - .../package.json | 55 - .../@babel/helper-module-imports/README.md | 4 +- .../lib/import-builder.js | 113 +- .../lib/import-builder.js.map | 1 + .../lib/import-injector.js | 91 +- .../lib/import-injector.js.map | 1 + .../@babel/helper-module-imports/lib/index.js | 24 +- .../helper-module-imports/lib/index.js.map | 1 + .../helper-module-imports/lib/is-module.js | 13 +- .../lib/is-module.js.map | 1 + .../@babel/helper-module-imports/package.json | 62 +- .../@babel/helper-module-transforms/README.md | 4 +- .../lib/dynamic-import.js | 53 + .../lib/dynamic-import.js.map | 1 + .../lib/get-module-name.js | 12 +- .../lib/get-module-name.js.map | 1 + .../helper-module-transforms/lib/index.js | 248 +- .../helper-module-transforms/lib/index.js.map | 1 + .../lib/normalize-and-load-metadata.js | 134 +- .../lib/normalize-and-load-metadata.js.map | 1 + .../lib/rewrite-live-references.js | 231 +- .../lib/rewrite-live-references.js.map | 1 + .../lib/rewrite-this.js | 32 +- .../lib/rewrite-this.js.map | 1 + .../helper-module-transforms/package.json | 68 +- .../helper-optimise-call-expression/README.md | 19 - .../lib/index.js | 30 - .../package.json | 52 - .../@babel/helper-plugin-utils/README.md | 4 +- .../@babel/helper-plugin-utils/lib/index.js | 53 +- .../helper-plugin-utils/lib/index.js.map | 1 + .../@babel/helper-plugin-utils/package.json | 60 +- .../@babel/helper-replace-supers/README.md | 19 - .../@babel/helper-replace-supers/lib/index.js | 276 - .../@babel/helper-replace-supers/package.json | 51 - .../@babel/helper-simple-access/README.md | 4 +- .../@babel/helper-simple-access/lib/index.js | 108 +- .../helper-simple-access/lib/index.js.map | 1 + .../@babel/helper-simple-access/package.json | 61 +- .../helper-split-export-declaration/README.md | 4 +- .../lib/index.js | 41 +- .../package.json | 57 +- .../LICENSE | 0 .../@babel/helper-string-parser/README.md | 19 + .../@babel/helper-string-parser/lib/index.js | 295 + .../helper-string-parser/lib/index.js.map | 1 + .../@babel/helper-string-parser/package.json | 28 + .../helper-validator-identifier/README.md | 4 +- .../lib/identifier.js | 31 +- .../lib/identifier.js.map | 1 + .../helper-validator-identifier/lib/index.js | 24 +- .../lib/index.js.map | 1 + .../lib/keyword.js | 8 +- .../lib/keyword.js.map | 1 + .../helper-validator-identifier/package.json | 64 +- .../scripts/generate-identifier-regex.js | 6 +- .../@babel/helper-validator-option/README.md | 4 +- .../lib/find-suggestion.js | 20 +- .../lib/find-suggestion.js.map | 1 + .../helper-validator-option/lib/index.js | 4 +- .../helper-validator-option/lib/index.js.map | 1 + .../helper-validator-option/lib/validator.js | 14 +- .../lib/validator.js.map | 1 + .../helper-validator-option/package.json | 56 +- .../@babel/helpers/lib/helpers-generated.js | 41 + .../helpers/lib/helpers-generated.js.map | 1 + node_modules/@babel/helpers/lib/helpers.js | 571 +- .../@babel/helpers/lib/helpers.js.map | 1 + .../helpers/lib/helpers/AsyncGenerator.js | 92 + .../helpers/lib/helpers/AsyncGenerator.js.map | 1 + .../helpers/lib/helpers/OverloadYield.js | 12 + .../helpers/lib/helpers/OverloadYield.js.map | 1 + .../@babel/helpers/lib/helpers/applyDecs.js | 448 + .../helpers/lib/helpers/applyDecs.js.map | 1 + .../helpers/lib/helpers/applyDecs2203.js | 363 + .../helpers/lib/helpers/applyDecs2203.js.map | 1 + .../helpers/lib/helpers/applyDecs2203R.js | 365 + .../helpers/lib/helpers/applyDecs2203R.js.map | 1 + .../helpers/lib/helpers/applyDecs2301.js | 410 + .../helpers/lib/helpers/applyDecs2301.js.map | 1 + .../helpers/lib/helpers/applyDecs2305.js | 388 + .../helpers/lib/helpers/applyDecs2305.js.map | 1 + .../lib/helpers/asyncGeneratorDelegate.js | 52 + .../lib/helpers/asyncGeneratorDelegate.js.map | 1 + .../helpers/lib/helpers/asyncIterator.js | 70 + .../helpers/lib/helpers/asyncIterator.js.map | 1 + .../lib/helpers/awaitAsyncGenerator.js | 12 + .../lib/helpers/awaitAsyncGenerator.js.map | 1 + .../@babel/helpers/lib/helpers/checkInRHS.js | 14 + .../helpers/lib/helpers/checkInRHS.js.map | 1 + .../helpers/lib/helpers/defineAccessor.js | 16 + .../helpers/lib/helpers/defineAccessor.js.map | 1 + .../@babel/helpers/lib/helpers/dispose.js | 51 + .../@babel/helpers/lib/helpers/dispose.js.map | 1 + .../lib/helpers/iterableToArrayLimit.js | 41 + .../lib/helpers/iterableToArrayLimit.js.map | 1 + .../lib/helpers/iterableToArrayLimitLoose.js | 18 + .../helpers/iterableToArrayLimitLoose.js.map | 1 + .../@babel/helpers/lib/helpers/jsx.js | 47 + .../@babel/helpers/lib/helpers/jsx.js.map | 1 + .../helpers/lib/helpers/objectSpread2.js | 39 + .../helpers/lib/helpers/objectSpread2.js.map | 1 + .../helpers/lib/helpers/regeneratorRuntime.js | 501 + .../lib/helpers/regeneratorRuntime.js.map | 1 + .../@babel/helpers/lib/helpers/typeof.js | 22 + .../@babel/helpers/lib/helpers/typeof.js.map | 1 + .../@babel/helpers/lib/helpers/using.js | 29 + .../@babel/helpers/lib/helpers/using.js.map | 1 + .../@babel/helpers/lib/helpers/wrapRegExp.js | 66 + .../helpers/lib/helpers/wrapRegExp.js.map | 1 + node_modules/@babel/helpers/lib/index.js | 213 +- node_modules/@babel/helpers/lib/index.js.map | 1 + node_modules/@babel/helpers/package.json | 68 +- .../helpers/scripts/generate-helpers.js | 64 + .../scripts/generate-regenerator-runtime.js | 64 + .../scripts/package.json | 0 node_modules/@babel/highlight/lib/index.js | 25 +- node_modules/@babel/highlight/package.json | 71 +- node_modules/@babel/parser/index.cjs | 5 + node_modules/@babel/parser/lib/index.js | 22815 ++++++++-------- node_modules/@babel/parser/lib/index.js.map | 2 +- node_modules/@babel/parser/lib/options.js | 40 + node_modules/@babel/parser/lib/options.js.map | 1 + node_modules/@babel/parser/lib/parse-error.js | 106 + .../@babel/parser/lib/parse-error.js.map | 1 + .../parser/lib/parse-error/credentials.js | 28 + .../parser/lib/parse-error/credentials.js.map | 1 + .../parser/lib/parse-error/module-errors.js | 20 + .../lib/parse-error/module-errors.js.map | 1 + .../parse-error/pipeline-operator-errors.js | 32 + .../pipeline-operator-errors.js.map | 1 + .../parser/lib/parse-error/standard-errors.js | 220 + .../lib/parse-error/standard-errors.js.map | 1 + .../lib/parse-error/strict-mode-errors.js | 22 + .../lib/parse-error/strict-mode-errors.js.map | 1 + .../lib/parse-error/to-node-description.js | 39 + .../parse-error/to-node-description.js.map | 1 + node_modules/@babel/parser/lib/parser/base.js | 36 + .../@babel/parser/lib/parser/base.js.map | 1 + .../@babel/parser/lib/parser/comments.js | 190 + .../@babel/parser/lib/parser/comments.js.map | 1 + .../@babel/parser/lib/parser/expression.js | 1824 ++ .../parser/lib/parser/expression.js.map | 1 + .../@babel/parser/lib/parser/index.js | 43 + .../@babel/parser/lib/parser/index.js.map | 1 + node_modules/@babel/parser/lib/parser/lval.js | 421 + .../@babel/parser/lib/parser/lval.js.map | 1 + node_modules/@babel/parser/lib/parser/node.js | 127 + .../@babel/parser/lib/parser/node.js.map | 1 + .../@babel/parser/lib/parser/statement.js | 2034 ++ .../@babel/parser/lib/parser/statement.js.map | 1 + node_modules/@babel/parser/lib/parser/util.js | 238 + .../@babel/parser/lib/parser/util.js.map | 1 + .../@babel/parser/lib/plugin-utils.js | 136 + .../@babel/parser/lib/plugin-utils.js.map | 1 + .../@babel/parser/lib/plugins/estree.js | 340 + .../@babel/parser/lib/plugins/estree.js.map | 1 + .../@babel/parser/lib/plugins/flow/index.js | 2474 ++ .../parser/lib/plugins/flow/index.js.map | 1 + .../@babel/parser/lib/plugins/flow/scope.js | 44 + .../parser/lib/plugins/flow/scope.js.map | 1 + .../@babel/parser/lib/plugins/jsx/index.js | 444 + .../parser/lib/plugins/jsx/index.js.map | 1 + .../@babel/parser/lib/plugins/jsx/xhtml.js | 266 + .../parser/lib/plugins/jsx/xhtml.js.map | 1 + .../@babel/parser/lib/plugins/placeholders.js | 197 + .../parser/lib/plugins/placeholders.js.map | 1 + .../parser/lib/plugins/typescript/index.js | 2656 ++ .../lib/plugins/typescript/index.js.map | 1 + .../parser/lib/plugins/typescript/scope.js | 119 + .../lib/plugins/typescript/scope.js.map | 1 + .../@babel/parser/lib/plugins/v8intrinsic.js | 31 + .../parser/lib/plugins/v8intrinsic.js.map | 1 + .../@babel/parser/lib/tokenizer/context.js | 27 + .../parser/lib/tokenizer/context.js.map | 1 + .../@babel/parser/lib/tokenizer/index.js | 1119 + .../@babel/parser/lib/tokenizer/index.js.map | 1 + .../@babel/parser/lib/tokenizer/state.js | 82 + .../@babel/parser/lib/tokenizer/state.js.map | 1 + .../@babel/parser/lib/tokenizer/types.js | 586 + .../@babel/parser/lib/tokenizer/types.js.map | 1 + .../@babel/parser/lib/util/class-scope.js | 92 + .../@babel/parser/lib/util/class-scope.js.map | 1 + .../parser/lib/util/expression-scope.js | 147 + .../parser/lib/util/expression-scope.js.map | 1 + .../@babel/parser/lib/util/identifier.js | 62 + .../@babel/parser/lib/util/identifier.js.map | 1 + .../@babel/parser/lib/util/location.js | 39 + .../@babel/parser/lib/util/location.js.map | 1 + .../parser/lib/util/production-parameter.js | 49 + .../lib/util/production-parameter.js.map | 1 + node_modules/@babel/parser/lib/util/scope.js | 161 + .../@babel/parser/lib/util/scope.js.map | 1 + .../@babel/parser/lib/util/scopeflags.js | 106 + .../@babel/parser/lib/util/scopeflags.js.map | 1 + .../@babel/parser/lib/util/whitespace.js | 59 + .../@babel/parser/lib/util/whitespace.js.map | 1 + node_modules/@babel/parser/package.json | 95 +- .../@babel/parser/typings/babel-parser.d.ts | 190 +- .../LICENSE | 0 .../@babel/plugin-syntax-jsx/README.md | 19 + .../@babel/plugin-syntax-jsx/lib/index.js | 24 + .../@babel/plugin-syntax-jsx/lib/index.js.map | 1 + .../@babel/plugin-syntax-jsx/package.json | 33 + .../package.json | 65 +- .../@babel/plugin-syntax-typescript/LICENSE | 22 + .../@babel/plugin-syntax-typescript/README.md | 19 + .../plugin-syntax-typescript/lib/index.js | 56 + .../plugin-syntax-typescript/lib/index.js.map | 1 + .../plugin-syntax-typescript/package.json | 35 + node_modules/@babel/template/lib/builder.js | 24 +- .../@babel/template/lib/builder.js.map | 1 + .../@babel/template/lib/formatters.js | 23 +- .../@babel/template/lib/formatters.js.map | 1 + node_modules/@babel/template/lib/index.js | 19 +- node_modules/@babel/template/lib/index.js.map | 1 + node_modules/@babel/template/lib/literal.js | 53 +- .../@babel/template/lib/literal.js.map | 1 + node_modules/@babel/template/lib/options.js | 33 +- .../@babel/template/lib/options.js.map | 1 + node_modules/@babel/template/lib/parse.js | 107 +- node_modules/@babel/template/lib/parse.js.map | 1 + node_modules/@babel/template/lib/populate.js | 69 +- .../@babel/template/lib/populate.js.map | 1 + node_modules/@babel/template/lib/string.js | 14 +- .../@babel/template/lib/string.js.map | 1 + .../@babel/code-frame/lib/index.js | 35 +- .../@babel/code-frame/lib/index.js.map | 1 + .../@babel/code-frame/package.json | 63 +- node_modules/@babel/template/package.json | 65 +- node_modules/@babel/traverse/lib/cache.js | 7 +- node_modules/@babel/traverse/lib/cache.js.map | 1 + node_modules/@babel/traverse/lib/context.js | 61 +- .../@babel/traverse/lib/context.js.map | 1 + node_modules/@babel/traverse/lib/hub.js | 8 +- node_modules/@babel/traverse/lib/hub.js.map | 1 + node_modules/@babel/traverse/lib/index.js | 81 +- node_modules/@babel/traverse/lib/index.js.map | 1 + .../@babel/traverse/lib/path/ancestry.js | 67 +- .../@babel/traverse/lib/path/ancestry.js.map | 1 + .../@babel/traverse/lib/path/comments.js | 49 +- .../@babel/traverse/lib/path/comments.js.map | 1 + .../@babel/traverse/lib/path/context.js | 131 +- .../@babel/traverse/lib/path/context.js.map | 1 + .../@babel/traverse/lib/path/conversion.js | 457 +- .../traverse/lib/path/conversion.js.map | 1 + .../@babel/traverse/lib/path/evaluation.js | 183 +- .../traverse/lib/path/evaluation.js.map | 1 + .../@babel/traverse/lib/path/family.js | 323 +- .../@babel/traverse/lib/path/family.js.map | 1 + .../traverse/lib/path/generated/asserts.js | 11 - .../traverse/lib/path/generated/validators.js | 11 - .../lib/path/generated/virtual-types.js | 7 - .../@babel/traverse/lib/path/index.js | 127 +- .../@babel/traverse/lib/path/index.js.map | 1 + .../traverse/lib/path/inference/index.js | 117 +- .../traverse/lib/path/inference/index.js.map | 1 + .../lib/path/inference/inferer-reference.js | 86 +- .../path/inference/inferer-reference.js.map | 1 + .../traverse/lib/path/inference/inferers.js | 246 +- .../lib/path/inference/inferers.js.map | 1 + .../traverse/lib/path/inference/util.js | 30 + .../traverse/lib/path/inference/util.js.map | 1 + .../@babel/traverse/lib/path/introspection.js | 221 +- .../traverse/lib/path/introspection.js.map | 1 + .../@babel/traverse/lib/path/lib/hoister.js | 65 +- .../traverse/lib/path/lib/hoister.js.map | 1 + .../traverse/lib/path/lib/removal-hooks.js | 8 +- .../lib/path/lib/removal-hooks.js.map | 1 + .../lib/path/lib/virtual-types-validator.js | 161 + .../path/lib/virtual-types-validator.js.map | 1 + .../traverse/lib/path/lib/virtual-types.js | 208 +- .../lib/path/lib/virtual-types.js.map | 1 + .../@babel/traverse/lib/path/modification.js | 151 +- .../traverse/lib/path/modification.js.map | 1 + .../@babel/traverse/lib/path/removal.js | 35 +- .../@babel/traverse/lib/path/removal.js.map | 1 + .../@babel/traverse/lib/path/replacement.js | 203 +- .../traverse/lib/path/replacement.js.map | 1 + .../@babel/traverse/lib/scope/binding.js | 34 +- .../@babel/traverse/lib/scope/binding.js.map | 1 + .../@babel/traverse/lib/scope/index.js | 475 +- .../@babel/traverse/lib/scope/index.js.map | 1 + .../@babel/traverse/lib/scope/lib/renamer.js | 115 +- .../traverse/lib/scope/lib/renamer.js.map | 1 + .../@babel/traverse/lib/traverse-node.js | 25 + .../@babel/traverse/lib/traverse-node.js.map | 1 + node_modules/@babel/traverse/lib/types.js | 10 +- node_modules/@babel/traverse/lib/types.js.map | 1 + node_modules/@babel/traverse/lib/visitors.js | 113 +- .../@babel/traverse/lib/visitors.js.map | 1 + .../@babel/code-frame/lib/index.js | 35 +- .../@babel/code-frame/lib/index.js.map | 1 + .../@babel/code-frame/package.json | 63 +- node_modules/@babel/traverse/package.json | 83 +- .../traverse/scripts/generators/asserts.js | 25 - .../traverse/scripts/generators/validators.js | 34 - .../scripts/generators/virtual-types.js | 24 - .../@babel/types/lib/asserts/assertNode.js | 11 +- .../types/lib/asserts/assertNode.js.map | 1 + .../types/lib/asserts/generated/index.js | 872 +- .../types/lib/asserts/generated/index.js.map | 1 + .../types/lib/ast-types/generated/index.js | 3 + .../lib/ast-types/generated/index.js.map | 1 + .../@babel/types/lib/builders/builder.js | 44 - .../lib/builders/flow/createFlowUnionType.js | 12 +- .../builders/flow/createFlowUnionType.js.map | 1 + .../flow/createTypeAnnotationBasedOnTypeof.js | 46 +- .../createTypeAnnotationBasedOnTypeof.js.map | 1 + .../types/lib/builders/generated/index.js | 2441 +- .../types/lib/builders/generated/index.js.map | 1 + .../types/lib/builders/generated/uppercase.js | 999 +- .../lib/builders/generated/uppercase.js.map | 1 + .../types/lib/builders/react/buildChildren.js | 15 +- .../lib/builders/react/buildChildren.js.map | 1 + .../builders/typescript/createTSUnionType.js | 17 +- .../typescript/createTSUnionType.js.map | 1 + .../@babel/types/lib/builders/validateNode.js | 17 + .../types/lib/builders/validateNode.js.map | 1 + node_modules/@babel/types/lib/clone/clone.js | 10 +- .../@babel/types/lib/clone/clone.js.map | 1 + .../@babel/types/lib/clone/cloneDeep.js | 10 +- .../@babel/types/lib/clone/cloneDeep.js.map | 1 + .../types/lib/clone/cloneDeepWithoutLoc.js | 10 +- .../lib/clone/cloneDeepWithoutLoc.js.map | 1 + .../@babel/types/lib/clone/cloneNode.js | 77 +- .../@babel/types/lib/clone/cloneNode.js.map | 1 + .../@babel/types/lib/clone/cloneWithoutLoc.js | 10 +- .../types/lib/clone/cloneWithoutLoc.js.map | 1 + .../@babel/types/lib/comments/addComment.js | 10 +- .../types/lib/comments/addComment.js.map | 1 + .../@babel/types/lib/comments/addComments.js | 9 +- .../types/lib/comments/addComments.js.map | 1 + .../lib/comments/inheritInnerComments.js | 10 +- .../lib/comments/inheritInnerComments.js.map | 1 + .../lib/comments/inheritLeadingComments.js | 10 +- .../comments/inheritLeadingComments.js.map | 1 + .../lib/comments/inheritTrailingComments.js | 10 +- .../comments/inheritTrailingComments.js.map | 1 + .../types/lib/comments/inheritsComments.js | 16 +- .../lib/comments/inheritsComments.js.map | 1 + .../types/lib/comments/removeComments.js | 7 +- .../types/lib/comments/removeComments.js.map | 1 + .../types/lib/constants/generated/index.js | 26 +- .../lib/constants/generated/index.js.map | 1 + .../@babel/types/lib/constants/index.js | 8 +- .../@babel/types/lib/constants/index.js.map | 1 + .../types/lib/converters/ensureBlock.js | 14 +- .../types/lib/converters/ensureBlock.js.map | 1 + .../converters/gatherSequenceExpressions.js | 23 +- .../gatherSequenceExpressions.js.map | 1 + .../lib/converters/toBindingIdentifierName.js | 10 +- .../converters/toBindingIdentifierName.js.map | 1 + .../@babel/types/lib/converters/toBlock.js | 11 +- .../types/lib/converters/toBlock.js.map | 1 + .../types/lib/converters/toComputedKey.js | 7 +- .../types/lib/converters/toComputedKey.js.map | 1 + .../types/lib/converters/toExpression.js | 11 +- .../types/lib/converters/toExpression.js.map | 1 + .../types/lib/converters/toIdentifier.js | 15 +- .../types/lib/converters/toIdentifier.js.map | 1 + .../@babel/types/lib/converters/toKeyAlias.js | 20 +- .../types/lib/converters/toKeyAlias.js.map | 1 + .../lib/converters/toSequenceExpression.js | 12 +- .../converters/toSequenceExpression.js.map | 1 + .../types/lib/converters/toStatement.js | 13 +- .../types/lib/converters/toStatement.js.map | 1 + .../types/lib/converters/valueToNode.js | 42 +- .../types/lib/converters/valueToNode.js.map | 1 + .../@babel/types/lib/definitions/core.js | 578 +- .../@babel/types/lib/definitions/core.js.map | 1 + .../lib/definitions/deprecated-aliases.js | 12 + .../lib/definitions/deprecated-aliases.js.map | 1 + .../types/lib/definitions/experimental.js | 145 +- .../types/lib/definitions/experimental.js.map | 1 + .../@babel/types/lib/definitions/flow.js | 285 +- .../@babel/types/lib/definitions/flow.js.map | 1 + .../@babel/types/lib/definitions/index.js | 66 +- .../@babel/types/lib/definitions/index.js.map | 1 + .../@babel/types/lib/definitions/jsx.js | 75 +- .../@babel/types/lib/definitions/jsx.js.map | 1 + .../@babel/types/lib/definitions/misc.js | 19 +- .../@babel/types/lib/definitions/misc.js.map | 1 + .../types/lib/definitions/placeholders.js | 9 +- .../types/lib/definitions/placeholders.js.map | 1 + .../types/lib/definitions/typescript.js | 233 +- .../types/lib/definitions/typescript.js.map | 1 + .../@babel/types/lib/definitions/utils.js | 108 +- .../@babel/types/lib/definitions/utils.js.map | 1 + .../@babel/types/lib/index-legacy.d.ts | 394 +- node_modules/@babel/types/lib/index.d.ts | 1694 +- node_modules/@babel/types/lib/index.js | 430 +- node_modules/@babel/types/lib/index.js.flow | 399 +- node_modules/@babel/types/lib/index.js.map | 1 + .../modifications/appendToMemberExpression.js | 6 +- .../appendToMemberExpression.js.map | 1 + .../flow/removeTypeDuplicates.js | 55 +- .../flow/removeTypeDuplicates.js.map | 1 + .../types/lib/modifications/inherits.js | 19 +- .../types/lib/modifications/inherits.js.map | 1 + .../prependToMemberExpression.js | 10 +- .../prependToMemberExpression.js.map | 1 + .../lib/modifications/removeProperties.js | 14 +- .../lib/modifications/removeProperties.js.map | 1 + .../lib/modifications/removePropertiesDeep.js | 13 +- .../modifications/removePropertiesDeep.js.map | 1 + .../typescript/removeTypeDuplicates.js | 61 +- .../typescript/removeTypeDuplicates.js.map | 1 + .../lib/retrievers/getBindingIdentifiers.js | 26 +- .../retrievers/getBindingIdentifiers.js.map | 1 + .../retrievers/getOuterBindingIdentifiers.js | 11 +- .../getOuterBindingIdentifiers.js.map | 1 + .../@babel/types/lib/traverse/traverse.js | 11 +- .../@babel/types/lib/traverse/traverse.js.map | 1 + .../@babel/types/lib/traverse/traverseFast.js | 8 +- .../types/lib/traverse/traverseFast.js.map | 1 + .../types/lib/utils/deprecationWarning.js | 44 + .../types/lib/utils/deprecationWarning.js.map | 1 + .../@babel/types/lib/utils/inherit.js | 5 +- .../@babel/types/lib/utils/inherit.js.map | 1 + .../react/cleanJSXElementLiteralChild.js | 15 +- .../react/cleanJSXElementLiteralChild.js.map | 1 + .../@babel/types/lib/utils/shallowEqual.js | 7 +- .../types/lib/utils/shallowEqual.js.map | 1 + .../validators/buildMatchMemberExpression.js | 10 +- .../buildMatchMemberExpression.js.map | 1 + .../types/lib/validators/generated/index.js | 5565 ++-- .../lib/validators/generated/index.js.map | 1 + .../@babel/types/lib/validators/is.js | 20 +- .../@babel/types/lib/validators/is.js.map | 1 + .../@babel/types/lib/validators/isBinding.js | 14 +- .../types/lib/validators/isBinding.js.map | 1 + .../types/lib/validators/isBlockScoped.js | 11 +- .../types/lib/validators/isBlockScoped.js.map | 1 + .../types/lib/validators/isImmutable.js | 13 +- .../types/lib/validators/isImmutable.js.map | 1 + .../@babel/types/lib/validators/isLet.js | 7 +- .../@babel/types/lib/validators/isLet.js.map | 1 + .../@babel/types/lib/validators/isNode.js | 6 +- .../@babel/types/lib/validators/isNode.js.map | 1 + .../types/lib/validators/isNodesEquivalent.js | 44 +- .../lib/validators/isNodesEquivalent.js.map | 1 + .../types/lib/validators/isPlaceholderType.js | 8 +- .../lib/validators/isPlaceholderType.js.map | 1 + .../types/lib/validators/isReferenced.js | 54 +- .../types/lib/validators/isReferenced.js.map | 1 + .../@babel/types/lib/validators/isScope.js | 8 +- .../types/lib/validators/isScope.js.map | 1 + .../lib/validators/isSpecifierDefault.js | 6 +- .../lib/validators/isSpecifierDefault.js.map | 1 + .../@babel/types/lib/validators/isType.js | 9 +- .../@babel/types/lib/validators/isType.js.map | 1 + .../lib/validators/isValidES3Identifier.js | 11 +- .../validators/isValidES3Identifier.js.map | 1 + .../types/lib/validators/isValidIdentifier.js | 8 +- .../lib/validators/isValidIdentifier.js.map | 1 + .../@babel/types/lib/validators/isVar.js | 7 +- .../@babel/types/lib/validators/isVar.js.map | 1 + .../types/lib/validators/matchesPattern.js | 14 +- .../lib/validators/matchesPattern.js.map | 1 + .../types/lib/validators/react/isCompatTag.js | 5 +- .../lib/validators/react/isCompatTag.js.map | 1 + .../lib/validators/react/isReactComponent.js | 10 +- .../validators/react/isReactComponent.js.map | 1 + .../@babel/types/lib/validators/validate.js | 10 +- .../types/lib/validators/validate.js.map | 1 + node_modules/@babel/types/package.json | 92 +- .../types/scripts/generators/asserts.js | 50 - .../types/scripts/generators/ast-types.js | 139 - .../types/scripts/generators/builders.js | 163 - .../types/scripts/generators/constants.js | 15 - .../@babel/types/scripts/generators/docs.js | 115 - .../@babel/types/scripts/generators/flow.js | 260 - .../scripts/generators/typescript-legacy.js | 369 - .../types/scripts/generators/validators.js | 87 - .../@babel/types/scripts/package.json | 1 - .../types/scripts/utils/formatBuilderName.js | 8 - .../@babel/types/scripts/utils/lowerFirst.js | 3 - .../types/scripts/utils/stringifyValidator.js | 66 - .../types/scripts/utils/toFunctionName.js | 4 - node_modules/@cnakazawa/watch/LICENSE | 55 - node_modules/@cnakazawa/watch/README.md | 153 - node_modules/@cnakazawa/watch/cli.js | 83 - node_modules/@cnakazawa/watch/main.js | 168 - node_modules/@cnakazawa/watch/package.json | 69 - .../@cnakazawa/watch/scripts/release.sh | 90 - node_modules/@jest/console/LICENSE | 2 +- .../@jest/console/build/BufferedConsole.d.ts | 36 - .../@jest/console/build/BufferedConsole.js | 108 +- .../@jest/console/build/CustomConsole.d.ts | 40 - .../@jest/console/build/CustomConsole.js | 112 +- .../@jest/console/build/NullConsole.d.ts | 23 - .../@jest/console/build/NullConsole.js | 21 +- .../@jest/console/build/getConsoleOutput.d.ts | 11 - .../@jest/console/build/getConsoleOutput.js | 76 +- node_modules/@jest/console/build/index.d.ts | 132 +- node_modules/@jest/console/build/index.js | 5 - node_modules/@jest/console/build/types.d.ts | 20 - node_modules/@jest/console/package.json | 70 +- node_modules/@jest/core/LICENSE | 2 +- .../@jest/core/build/FailedTestsCache.d.ts | 15 - .../@jest/core/build/FailedTestsCache.js | 37 +- .../core/build/FailedTestsInteractiveMode.js | 195 + .../@jest/core/build/ReporterDispatcher.d.ts | 23 - .../@jest/core/build/ReporterDispatcher.js | 45 +- .../@jest/core/build/SearchSource.d.ts | 45 - node_modules/@jest/core/build/SearchSource.js | 204 +- .../core/build/SnapshotInteractiveMode.d.ts | 30 - .../core/build/SnapshotInteractiveMode.js | 217 +- .../core/build/TestNamePatternPrompt.d.ts | 17 - .../@jest/core/build/TestNamePatternPrompt.js | 61 +- .../core/build/TestPathPatternPrompt.d.ts | 24 - .../@jest/core/build/TestPathPatternPrompt.js | 56 +- .../@jest/core/build/TestScheduler.d.ts | 41 - .../@jest/core/build/TestScheduler.js | 528 +- .../@jest/core/build/TestWatcher.d.ts | 22 - node_modules/@jest/core/build/TestWatcher.js | 60 - .../@jest/core/build/assets/jest_logo.png | Bin 3157 -> 0 bytes node_modules/@jest/core/build/cli/index.d.ts | 12 - node_modules/@jest/core/build/cli/index.js | 375 +- .../@jest/core/build/collectHandles.d.ts | 9 - .../@jest/core/build/collectHandles.js | 164 +- .../core/build/getChangedFilesPromise.d.ts | 10 - .../core/build/getChangedFilesPromise.js | 24 +- .../core/build/getConfigsOfProjectsToRun.d.ts | 8 - .../core/build/getConfigsOfProjectsToRun.js | 26 +- .../@jest/core/build/getNoTestFound.d.ts | 9 - .../@jest/core/build/getNoTestFound.js | 33 +- .../core/build/getNoTestFoundFailed.d.ts | 8 - .../@jest/core/build/getNoTestFoundFailed.js | 20 +- .../build/getNoTestFoundPassWithNoTests.d.ts | 7 - .../build/getNoTestFoundPassWithNoTests.js | 8 +- .../getNoTestFoundRelatedToChangedFiles.d.ts | 8 - .../getNoTestFoundRelatedToChangedFiles.js | 21 +- .../core/build/getNoTestFoundVerbose.d.ts | 9 - .../@jest/core/build/getNoTestFoundVerbose.js | 40 +- .../core/build/getNoTestsFoundMessage.d.ts | 9 - .../core/build/getNoTestsFoundMessage.js | 46 +- .../core/build/getProjectDisplayName.d.ts | 8 - .../@jest/core/build/getProjectDisplayName.js | 12 +- .../build/getProjectNamesMissingWarning.d.ts | 8 - .../build/getProjectNamesMissingWarning.js | 22 +- .../core/build/getSelectProjectsMessage.d.ts | 8 - .../core/build/getSelectProjectsMessage.js | 44 +- node_modules/@jest/core/build/index.d.ts | 118 + node_modules/@jest/core/build/index.js | 36 + node_modules/@jest/core/build/jest.d.ts | 11 - node_modules/@jest/core/build/jest.js | 49 - .../core/build/lib/activeFiltersMessage.d.ts | 9 - .../core/build/lib/activeFiltersMessage.js | 17 +- .../@jest/core/build/lib/createContext.d.ts | 11 - .../@jest/core/build/lib/createContext.js | 24 +- .../build/lib/handleDeprecationWarnings.d.ts | 9 - .../build/lib/handleDeprecationWarnings.js | 36 +- .../@jest/core/build/lib/isValidPath.d.ts | 8 - .../@jest/core/build/lib/isValidPath.js | 7 +- .../core/build/lib/logDebugMessages.d.ts | 9 - .../@jest/core/build/lib/logDebugMessages.js | 9 +- .../core/build/lib/updateGlobalConfig.d.ts | 11 - .../core/build/lib/updateGlobalConfig.js | 43 +- .../core/build/lib/watchPluginsHelpers.d.ts | 10 - .../core/build/lib/watchPluginsHelpers.js | 14 +- .../build/plugins/FailedTestsInteractive.js | 96 + .../@jest/core/build/plugins/Quit.d.ts | 18 - node_modules/@jest/core/build/plugins/Quit.js | 32 +- .../core/build/plugins/TestNamePattern.d.ts | 21 - .../core/build/plugins/TestNamePattern.js | 65 +- .../core/build/plugins/TestPathPattern.d.ts | 21 - .../core/build/plugins/TestPathPattern.js | 65 +- .../core/build/plugins/UpdateSnapshots.d.ts | 21 - .../core/build/plugins/UpdateSnapshots.js | 35 +- .../plugins/UpdateSnapshotsInteractive.d.ts | 20 - .../plugins/UpdateSnapshotsInteractive.js | 78 +- node_modules/@jest/core/build/pluralize.d.ts | 7 - node_modules/@jest/core/build/pluralize.js | 4 +- .../@jest/core/build/runGlobalHook.d.ts | 14 - .../@jest/core/build/runGlobalHook.js | 139 +- node_modules/@jest/core/build/runJest.d.ts | 27 - node_modules/@jest/core/build/runJest.js | 214 +- .../@jest/core/build/testSchedulerHelper.d.ts | 9 - .../@jest/core/build/testSchedulerHelper.js | 19 +- node_modules/@jest/core/build/types.d.ts | 39 - node_modules/@jest/core/build/version.d.ts | 7 - node_modules/@jest/core/build/version.js | 5 +- node_modules/@jest/core/build/watch.d.ts | 13 - node_modules/@jest/core/build/watch.js | 257 +- node_modules/@jest/core/package.json | 126 +- node_modules/@jest/environment/LICENSE | 2 +- .../@jest/environment/build/index.d.ts | 684 +- node_modules/@jest/environment/build/index.js | 14 - node_modules/@jest/environment/package.json | 68 +- node_modules/@jest/expect-utils/LICENSE | 21 + node_modules/@jest/expect-utils/README.md | 5 + .../expect-utils/build/immutableUtils.js | 66 + .../@jest/expect-utils/build/index.d.ts | 92 + .../@jest/expect-utils/build/index.js | 34 + .../@jest/expect-utils/build/jasmineUtils.js | 218 + .../expect-utils}/build/types.js | 0 .../@jest/expect-utils/build/utils.js | 453 + node_modules/@jest/expect-utils/package.json | 35 + node_modules/@jest/expect/LICENSE | 21 + node_modules/@jest/expect/README.md | 5 + node_modules/@jest/expect/build/index.d.ts | 68 + node_modules/@jest/expect/build/index.js | 40 + .../init => @jest/expect/build}/types.js | 0 node_modules/@jest/expect/package.json | 34 + node_modules/@jest/fake-timers/LICENSE | 2 +- .../@jest/fake-timers/build/index.d.ts | 108 +- node_modules/@jest/fake-timers/build/index.js | 3 - .../fake-timers/build/legacyFakeTimers.d.ts | 62 - .../fake-timers/build/legacyFakeTimers.js | 402 +- .../fake-timers/build/modernFakeTimers.d.ts | 35 - .../fake-timers/build/modernFakeTimers.js | 157 +- node_modules/@jest/fake-timers/package.json | 74 +- node_modules/@jest/globals/LICENSE | 2 +- node_modules/@jest/globals/build/index.d.ts | 56 +- node_modules/@jest/globals/build/index.js | 19 +- node_modules/@jest/globals/package.json | 68 +- node_modules/@jest/reporters/LICENSE | 2 +- .../@jest/reporters/assets/jest_logo.png | Bin 0 -> 3030 bytes .../@jest/reporters/build/BaseReporter.d.ts | 19 - .../@jest/reporters/build/BaseReporter.js | 45 +- .../reporters/build/CoverageReporter.d.ts | 23 - .../@jest/reporters/build/CoverageReporter.js | 255 +- .../@jest/reporters/build/CoverageWorker.d.ts | 17 - .../@jest/reporters/build/CoverageWorker.js | 46 +- .../reporters/build/DefaultReporter.d.ts | 31 - .../@jest/reporters/build/DefaultReporter.js | 173 +- .../reporters/build/GitHubActionsReporter.js | 364 + .../@jest/reporters/build/NotifyReporter.d.ts | 18 - .../@jest/reporters/build/NotifyReporter.js | 108 +- .../@jest/reporters/build/Status.d.ts | 42 - node_modules/@jest/reporters/build/Status.js | 146 +- .../reporters/build/SummaryReporter.d.ts | 21 - .../@jest/reporters/build/SummaryReporter.js | 147 +- .../reporters/build/VerboseReporter.d.ts | 24 - .../@jest/reporters/build/VerboseReporter.js | 80 +- .../@jest/reporters/build/formatTestPath.js | 84 + .../build/generateEmptyCoverage.d.ts | 19 - .../reporters/build/generateEmptyCoverage.js | 69 +- .../reporters/build/getResultHeader.d.ts | 10 - .../@jest/reporters/build/getResultHeader.js | 72 +- .../reporters/build/getSnapshotStatus.d.ts | 9 - .../reporters/build/getSnapshotStatus.js | 67 +- .../reporters/build/getSnapshotSummary.d.ts | 10 - .../reporters/build/getSnapshotSummary.js | 156 +- .../@jest/reporters/build/getSummary.js | 206 + .../@jest/reporters/build/getWatermarks.d.ts | 9 - .../@jest/reporters/build/getWatermarks.js | 13 +- node_modules/@jest/reporters/build/index.d.ts | 326 +- node_modules/@jest/reporters/build/index.js | 44 +- .../@jest/reporters/build/printDisplayName.js | 35 + .../@jest/reporters/build/relativePath.js | 72 + .../reporters/build/trimAndFormatPath.js | 118 + node_modules/@jest/reporters/build/types.d.ts | 75 - node_modules/@jest/reporters/build/utils.d.ts | 18 - node_modules/@jest/reporters/build/utils.js | 429 - .../@jest/reporters/build/wrapAnsiString.js | 69 + node_modules/@jest/reporters/package.json | 112 +- node_modules/@jest/schemas/LICENSE | 21 + node_modules/@jest/schemas/README.md | 3 + node_modules/@jest/schemas/build/index.d.ts | 72 + node_modules/@jest/schemas/build/index.js | 60 + node_modules/@jest/schemas/package.json | 29 + node_modules/@jest/source-map/LICENSE | 2 +- .../@jest/source-map/build/getCallsite.d.ts | 9 - .../@jest/source-map/build/getCallsite.js | 72 +- .../@jest/source-map/build/index.d.ts | 14 +- node_modules/@jest/source-map/build/index.js | 2 - .../@jest/source-map/build/types.d.ts | 7 - node_modules/@jest/source-map/package.json | 64 +- node_modules/@jest/test-result/LICENSE | 2 +- .../test-result/build/formatTestResults.d.ts | 8 - .../test-result/build/formatTestResults.js | 73 +- .../@jest/test-result/build/helpers.d.ts | 12 - .../@jest/test-result/build/helpers.js | 34 +- .../@jest/test-result/build/index.d.ts | 229 +- node_modules/@jest/test-result/build/index.js | 15 +- .../@jest/test-result/build/types.d.ts | 152 - node_modules/@jest/test-result/package.json | 72 +- node_modules/@jest/test-sequencer/LICENSE | 2 +- .../@jest/test-sequencer/build/index.d.ts | 95 +- .../@jest/test-sequencer/build/index.js | 254 +- .../@jest/test-sequencer/package.json | 67 +- node_modules/@jest/transform/LICENSE | 2 +- .../transform/build/ScriptTransformer.d.ts | 33 - .../transform/build/ScriptTransformer.js | 934 +- .../build/enhanceUnexpectedTokenMessage.d.ts | 12 - .../build/enhanceUnexpectedTokenMessage.js | 54 +- node_modules/@jest/transform/build/index.d.ts | 240 +- node_modules/@jest/transform/build/index.js | 62 +- .../build/runtimeErrorsAndWarnings.js | 94 + .../transform/build/shouldInstrument.d.ts | 9 - .../@jest/transform/build/shouldInstrument.js | 71 +- node_modules/@jest/transform/build/types.d.ts | 44 - node_modules/@jest/transform/package.json | 102 +- node_modules/@jest/types/LICENSE | 2 +- node_modules/@jest/types/README.md | 30 + node_modules/@jest/types/build/Circus.d.ts | 191 - node_modules/@jest/types/build/Config.d.ts | 433 - node_modules/@jest/types/build/Global.d.ts | 88 - .../@jest/types/build/TestResult.d.ts | 31 - node_modules/@jest/types/build/Transform.d.ts | 12 - node_modules/@jest/types/build/index.d.ts | 1187 +- node_modules/@jest/types/package.json | 94 +- node_modules/@jridgewell/gen-mapping/LICENSE | 19 + .../@jridgewell/gen-mapping/README.md | 227 + .../gen-mapping/dist/gen-mapping.mjs | 230 + .../gen-mapping/dist/gen-mapping.mjs.map | 1 + .../gen-mapping/dist/gen-mapping.umd.js | 236 + .../gen-mapping/dist/gen-mapping.umd.js.map | 1 + .../gen-mapping/dist/types/gen-mapping.d.ts | 90 + .../dist/types/sourcemap-segment.d.ts | 12 + .../gen-mapping/dist/types/types.d.ts | 35 + .../@jridgewell/gen-mapping/package.json | 77 + node_modules/@jridgewell/resolve-uri/LICENSE | 19 + .../@jridgewell/resolve-uri/README.md | 40 + .../resolve-uri/dist/resolve-uri.mjs | 242 + .../resolve-uri/dist/resolve-uri.mjs.map | 1 + .../resolve-uri/dist/resolve-uri.umd.js | 250 + .../resolve-uri/dist/resolve-uri.umd.js.map | 1 + .../resolve-uri/dist/types/resolve-uri.d.ts | 4 + .../@jridgewell/resolve-uri/package.json | 69 + node_modules/@jridgewell/set-array/LICENSE | 19 + node_modules/@jridgewell/set-array/README.md | 37 + .../@jridgewell/set-array/dist/set-array.mjs | 48 + .../set-array/dist/set-array.mjs.map | 1 + .../set-array/dist/set-array.umd.js | 58 + .../set-array/dist/set-array.umd.js.map | 1 + .../set-array/dist/types/set-array.d.ts | 26 + .../@jridgewell/set-array/package.json | 66 + .../@jridgewell/set-array/src/set-array.ts | 55 + .../@jridgewell/sourcemap-codec/LICENSE | 21 + .../@jridgewell/sourcemap-codec/README.md | 200 + .../sourcemap-codec/dist/sourcemap-codec.mjs | 164 + .../dist/sourcemap-codec.mjs.map | 1 + .../dist/sourcemap-codec.umd.js | 175 + .../dist/sourcemap-codec.umd.js.map | 1 + .../dist/types/sourcemap-codec.d.ts | 6 + .../@jridgewell/sourcemap-codec/package.json | 74 + .../@jridgewell/trace-mapping/LICENSE | 19 + .../@jridgewell/trace-mapping/README.md | 252 + .../trace-mapping/dist/trace-mapping.mjs | 552 + .../trace-mapping/dist/trace-mapping.mjs.map | 1 + .../trace-mapping/dist/trace-mapping.umd.js | 566 + .../dist/trace-mapping.umd.js.map | 1 + .../trace-mapping/dist/types/any-map.d.ts | 8 + .../dist/types/binary-search.d.ts | 32 + .../trace-mapping/dist/types/by-source.d.ts | 7 + .../trace-mapping/dist/types/resolve.d.ts | 1 + .../trace-mapping/dist/types/sort.d.ts | 2 + .../dist/types/sourcemap-segment.d.ts | 16 + .../dist/types/strip-filename.d.ts | 4 + .../dist/types/trace-mapping.d.ts | 74 + .../trace-mapping/dist/types/types.d.ts | 92 + .../@jridgewell/sourcemap-codec/LICENSE | 21 + .../@jridgewell/sourcemap-codec/README.md | 200 + .../sourcemap-codec/dist/sourcemap-codec.mjs | 164 + .../dist/sourcemap-codec.mjs.map | 1 + .../dist/sourcemap-codec.umd.js | 175 + .../dist/sourcemap-codec.umd.js.map | 1 + .../dist/types/sourcemap-codec.d.ts | 6 + .../@jridgewell/sourcemap-codec/package.json | 75 + .../sourcemap-codec/src/sourcemap-codec.ts | 198 + .../@jridgewell/trace-mapping/package.json | 75 + .../@sinclair/typebox/compiler/compiler.d.ts | 28 + .../@sinclair/typebox/compiler/compiler.js | 498 + .../@sinclair/typebox/compiler/index.d.ts | 2 + .../@sinclair/typebox/compiler/index.js | 47 + .../typebox/conditional/conditional.d.ts | 17 + .../typebox/conditional/conditional.js | 91 + .../@sinclair/typebox/conditional/index.d.ts | 2 + .../@sinclair/typebox/conditional/index.js | 45 + .../typebox/conditional/structural.d.ts | 11 + .../typebox/conditional/structural.js | 685 + .../@sinclair/typebox/custom/custom.d.ts | 12 + .../@sinclair/typebox/custom/custom.js | 55 + .../@sinclair/typebox/custom/index.d.ts | 1 + .../@sinclair/typebox/custom/index.js | 44 + .../@sinclair/typebox/errors/errors.d.ts | 67 + .../@sinclair/typebox/errors/errors.js | 472 + .../@sinclair/typebox/errors/index.d.ts | 1 + .../@sinclair/typebox/errors/index.js | 44 + .../@sinclair/typebox/format/format.d.ts | 12 + .../@sinclair/typebox/format/format.js | 55 + .../@sinclair/typebox/format/index.d.ts | 1 + .../@sinclair/typebox/format/index.js | 44 + .../@sinclair/typebox/guard/extends.d.ts | 10 + .../@sinclair/typebox/guard/extends.js | 50 + .../@sinclair/typebox/guard/guard.d.ts | 60 + node_modules/@sinclair/typebox/guard/guard.js | 440 + .../@sinclair/typebox/guard/index.d.ts | 2 + node_modules/@sinclair/typebox/guard/index.js | 45 + node_modules/@sinclair/typebox/hash/hash.d.ts | 8 + node_modules/@sinclair/typebox/hash/hash.js | 183 + .../@sinclair/typebox/hash/index.d.ts | 1 + node_modules/@sinclair/typebox/hash/index.js | 44 + node_modules/@sinclair/typebox/license | 23 + node_modules/@sinclair/typebox/package.json | 52 + node_modules/@sinclair/typebox/readme.md | 1237 + .../@sinclair/typebox/system/index.d.ts | 1 + .../@sinclair/typebox/system/index.js | 44 + .../@sinclair/typebox/system/system.d.ts | 17 + .../@sinclair/typebox/system/system.js | 69 + node_modules/@sinclair/typebox/typebox.d.ts | 422 + node_modules/@sinclair/typebox/typebox.js | 388 + .../@sinclair/typebox/value/cast.d.ts | 26 + node_modules/@sinclair/typebox/value/cast.js | 415 + .../@sinclair/typebox/value/check.d.ts | 8 + node_modules/@sinclair/typebox/value/check.js | 405 + .../@sinclair/typebox/value/clone.d.ts | 3 + node_modules/@sinclair/typebox/value/clone.js | 71 + .../@sinclair/typebox/value/create.d.ts | 14 + .../@sinclair/typebox/value/create.js | 378 + .../@sinclair/typebox/value/delta.d.ts | 43 + node_modules/@sinclair/typebox/value/delta.js | 204 + .../@sinclair/typebox/value/equal.d.ts | 3 + node_modules/@sinclair/typebox/value/equal.js | 80 + .../@sinclair/typebox/value/index.d.ts | 4 + node_modules/@sinclair/typebox/value/index.js | 53 + node_modules/@sinclair/typebox/value/is.d.ts | 11 + node_modules/@sinclair/typebox/value/is.js | 53 + .../@sinclair/typebox/value/pointer.d.ts | 24 + .../@sinclair/typebox/value/pointer.js | 142 + .../@sinclair/typebox/value/value.d.ts | 32 + node_modules/@sinclair/typebox/value/value.js | 87 + node_modules/@sinonjs/commons/CHANGES.md | 43 - node_modules/@sinonjs/commons/README.md | 12 +- .../commons/lib/called-in-order.test.js | 46 +- .../@sinonjs/commons/lib/class-name.test.js | 10 +- .../@sinonjs/commons/lib/deprecated.js | 17 +- .../@sinonjs/commons/lib/deprecated.test.js | 47 +- node_modules/@sinonjs/commons/lib/every.js | 2 +- .../@sinonjs/commons/lib/every.test.js | 14 +- .../commons/lib/function-name.test.js | 42 +- .../@sinonjs/commons/lib/global.test.js | 6 +- node_modules/@sinonjs/commons/lib/index.js | 2 +- .../@sinonjs/commons/lib/index.test.js | 14 +- .../commons/lib/order-by-first-call.test.js | 10 +- .../@sinonjs/commons/lib/prototypes/README.md | 5 +- .../@sinonjs/commons/lib/prototypes/array.js | 2 +- .../lib/prototypes/copy-prototype-methods.js | 40 + .../prototypes/copy-prototype-methods.test.js | 12 + .../commons/lib/prototypes/copy-prototype.js | 21 - .../commons/lib/prototypes/function.js | 2 +- .../@sinonjs/commons/lib/prototypes/index.js | 2 +- .../commons/lib/prototypes/index.test.js | 44 +- .../@sinonjs/commons/lib/prototypes/map.js | 2 +- .../@sinonjs/commons/lib/prototypes/object.js | 2 +- .../@sinonjs/commons/lib/prototypes/set.js | 2 +- .../@sinonjs/commons/lib/prototypes/string.js | 2 +- .../commons/lib/prototypes/throws-on-proto.js | 26 + .../@sinonjs/commons/lib/type-of.test.js | 24 +- .../commons/lib/value-to-string.test.js | 8 +- node_modules/@sinonjs/commons/package.json | 116 +- ...otype.d.ts => copy-prototype-methods.d.ts} | 0 .../types/prototypes/throws-on-proto.d.ts | 12 + .../@sinonjs/fake-timers/CHANGELOG.md | 347 - node_modules/@sinonjs/fake-timers/README.md | 88 +- .../@sinonjs/fake-timers/fake-timers.js | 2625 -- .../@sinonjs/fake-timers/package.json | 146 +- .../fake-timers/src/fake-timers-src.js | 1090 +- node_modules/@types/babel__core/LICENSE | 0 node_modules/@types/babel__core/README.md | 2 +- node_modules/@types/babel__core/index.d.ts | 239 +- node_modules/@types/babel__core/package.json | 119 +- node_modules/@types/babel__generator/LICENSE | 0 .../@types/babel__generator/README.md | 4 +- .../@types/babel__generator/index.d.ts | 59 +- .../@types/babel__generator/package.json | 105 +- node_modules/@types/babel__template/LICENSE | 0 node_modules/@types/babel__template/README.md | 2 +- .../@types/babel__template/index.d.ts | 8 +- .../@types/babel__template/package.json | 103 +- node_modules/@types/babel__traverse/LICENSE | 0 node_modules/@types/babel__traverse/README.md | 4 +- .../@types/babel__traverse/index.d.ts | 1662 +- .../@types/babel__traverse/package.json | 142 +- .../@types/babel__traverse/ts4.1/index.d.ts | 1158 - node_modules/@types/graceful-fs/LICENSE | 0 node_modules/@types/graceful-fs/README.md | 24 +- node_modules/@types/graceful-fs/index.d.ts | 1 - node_modules/@types/graceful-fs/package.json | 85 +- .../@types/istanbul-lib-coverage/LICENSE | 0 .../@types/istanbul-lib-coverage/README.md | 4 +- .../@types/istanbul-lib-coverage/index.d.ts | 1 - .../@types/istanbul-lib-coverage/package.json | 79 +- node_modules/@types/istanbul-reports/LICENSE | 0 .../@types/istanbul-reports/README.md | 80 +- .../@types/istanbul-reports/index.d.ts | 4 +- .../@types/istanbul-reports/package.json | 85 +- node_modules/@types/node/README.md | 8 +- node_modules/@types/node/assert.d.ts | 987 +- node_modules/@types/node/assert/strict.d.ts | 8 + node_modules/@types/node/async_hooks.d.ts | 503 +- node_modules/@types/node/base.d.ts | 19 - node_modules/@types/node/buffer.d.ts | 2349 +- node_modules/@types/node/child_process.d.ts | 1497 +- node_modules/@types/node/cluster.d.ts | 562 +- node_modules/@types/node/console.d.ts | 369 +- node_modules/@types/node/constants.d.ts | 11 +- node_modules/@types/node/crypto.d.ts | 4206 ++- node_modules/@types/node/dgram.d.ts | 554 +- .../@types/node/diagnostics_channel.d.ts | 191 + node_modules/@types/node/dns.d.ts | 832 +- node_modules/@types/node/dns/promises.d.ts | 414 + node_modules/@types/node/dom-events.d.ts | 126 + node_modules/@types/node/domain.d.ts | 180 +- node_modules/@types/node/events.d.ts | 731 +- node_modules/@types/node/fs.d.ts | 3781 ++- node_modules/@types/node/fs/promises.d.ts | 1345 +- node_modules/@types/node/globals.d.ts | 495 +- node_modules/@types/node/globals.global.d.ts | 2 +- node_modules/@types/node/http.d.ts | 1681 +- node_modules/@types/node/http2.d.ts | 2229 +- node_modules/@types/node/https.d.ts | 447 +- node_modules/@types/node/index.d.ts | 109 +- node_modules/@types/node/inspector.d.ts | 1334 +- node_modules/@types/node/module.d.ts | 93 +- node_modules/@types/node/net.d.ts | 909 +- node_modules/@types/node/os.d.ts | 292 +- node_modules/@types/node/package.json | 472 +- node_modules/@types/node/path.d.ts | 95 +- node_modules/@types/node/perf_hooks.d.ts | 597 +- node_modules/@types/node/process.d.ts | 1507 +- node_modules/@types/node/punycode.d.ts | 103 +- node_modules/@types/node/querystring.d.ts | 127 +- node_modules/@types/node/readline.d.ts | 570 +- .../@types/node/readline/promises.d.ts | 145 + node_modules/@types/node/repl.d.ts | 305 +- node_modules/@types/node/stream.d.ts | 1610 +- .../@types/node/stream/consumers.d.ts | 12 + node_modules/@types/node/stream/promises.d.ts | 42 + node_modules/@types/node/stream/web.d.ts | 330 + node_modules/@types/node/string_decoder.d.ts | 64 +- node_modules/@types/node/test.d.ts | 1052 + node_modules/@types/node/timers.d.ts | 227 +- node_modules/@types/node/timers/promises.d.ts | 93 + node_modules/@types/node/tls.d.ts | 908 +- node_modules/@types/node/trace_events.d.ts | 145 +- node_modules/@types/node/ts3.6/assert.d.ts | 103 - node_modules/@types/node/ts3.6/base.d.ts | 61 - node_modules/@types/node/ts3.6/index.d.ts | 7 - node_modules/@types/node/ts4.8/assert.d.ts | 972 + .../@types/node/ts4.8/assert/strict.d.ts | 8 + .../@types/node/ts4.8/async_hooks.d.ts | 530 + node_modules/@types/node/ts4.8/buffer.d.ts | 2351 ++ .../@types/node/ts4.8/child_process.d.ts | 1395 + node_modules/@types/node/ts4.8/cluster.d.ts | 410 + node_modules/@types/node/ts4.8/console.d.ts | 412 + node_modules/@types/node/ts4.8/constants.d.ts | 18 + node_modules/@types/node/ts4.8/crypto.d.ts | 3961 +++ node_modules/@types/node/ts4.8/dgram.d.ts | 545 + .../node/ts4.8/diagnostics_channel.d.ts | 191 + node_modules/@types/node/ts4.8/dns.d.ts | 668 + .../@types/node/ts4.8/dns/promises.d.ts | 414 + .../@types/node/ts4.8/dom-events.d.ts | 126 + node_modules/@types/node/ts4.8/domain.d.ts | 170 + node_modules/@types/node/ts4.8/events.d.ts | 724 + node_modules/@types/node/ts4.8/fs.d.ts | 4043 +++ .../@types/node/ts4.8/fs/promises.d.ts | 1189 + node_modules/@types/node/ts4.8/globals.d.ts | 303 + .../@types/node/ts4.8/globals.global.d.ts | 1 + node_modules/@types/node/ts4.8/http.d.ts | 1724 ++ node_modules/@types/node/ts4.8/http2.d.ts | 2129 ++ node_modules/@types/node/ts4.8/https.d.ts | 441 + node_modules/@types/node/ts4.8/index.d.ts | 88 + node_modules/@types/node/ts4.8/inspector.d.ts | 2748 ++ node_modules/@types/node/ts4.8/module.d.ts | 116 + node_modules/@types/node/ts4.8/net.d.ts | 886 + node_modules/@types/node/ts4.8/os.d.ts | 477 + node_modules/@types/node/ts4.8/path.d.ts | 191 + .../@types/node/ts4.8/perf_hooks.d.ts | 638 + node_modules/@types/node/ts4.8/process.d.ts | 1485 + node_modules/@types/node/ts4.8/punycode.d.ts | 117 + .../@types/node/ts4.8/querystring.d.ts | 131 + node_modules/@types/node/ts4.8/readline.d.ts | 526 + .../@types/node/ts4.8/readline/promises.d.ts | 145 + node_modules/@types/node/ts4.8/repl.d.ts | 424 + node_modules/@types/node/ts4.8/stream.d.ts | 1392 + .../@types/node/ts4.8/stream/consumers.d.ts | 12 + .../@types/node/ts4.8/stream/promises.d.ts | 42 + .../@types/node/ts4.8/stream/web.d.ts | 330 + .../@types/node/ts4.8/string_decoder.d.ts | 67 + node_modules/@types/node/ts4.8/test.d.ts | 1052 + node_modules/@types/node/ts4.8/timers.d.ts | 215 + .../@types/node/ts4.8/timers/promises.d.ts | 93 + node_modules/@types/node/ts4.8/tls.d.ts | 1119 + .../@types/node/ts4.8/trace_events.d.ts | 182 + node_modules/@types/node/ts4.8/tty.d.ts | 205 + node_modules/@types/node/ts4.8/url.d.ts | 901 + node_modules/@types/node/ts4.8/util.d.ts | 2052 ++ node_modules/@types/node/ts4.8/v8.d.ts | 635 + node_modules/@types/node/ts4.8/vm.d.ts | 894 + node_modules/@types/node/ts4.8/wasi.d.ts | 152 + .../@types/node/ts4.8/worker_threads.d.ts | 693 + node_modules/@types/node/ts4.8/zlib.d.ts | 517 + node_modules/@types/node/tty.d.ts | 187 +- node_modules/@types/node/url.d.ts | 879 +- node_modules/@types/node/util.d.ts | 2167 +- node_modules/@types/node/v8.d.ts | 596 +- node_modules/@types/node/vm.d.ts | 860 +- node_modules/@types/node/wasi.d.ts | 140 +- node_modules/@types/node/worker_threads.d.ts | 729 +- node_modules/@types/node/zlib.d.ts | 314 +- .../@types/normalize-package-data/LICENSE | 21 - .../@types/normalize-package-data/README.md | 16 - .../@types/normalize-package-data/index.d.ts | 46 - .../normalize-package-data/package.json | 51 - node_modules/@types/prettier/LICENSE | 0 node_modules/@types/prettier/README.md | 6 +- node_modules/@types/prettier/doc.d.ts | 131 +- node_modules/@types/prettier/index.d.ts | 590 +- node_modules/@types/prettier/package.json | 136 +- .../@types/prettier/parser-angular.d.ts | 9 +- .../@types/prettier/parser-babel.d.ts | 14 +- .../@types/prettier/parser-espree.d.ts | 6 +- node_modules/@types/prettier/parser-flow.d.ts | 6 +- .../@types/prettier/parser-glimmer.d.ts | 6 +- .../@types/prettier/parser-graphql.d.ts | 6 +- node_modules/@types/prettier/parser-html.d.ts | 9 +- .../@types/prettier/parser-markdown.d.ts | 8 +- .../@types/prettier/parser-meriyah.d.ts | 6 +- .../@types/prettier/parser-postcss.d.ts | 8 +- .../@types/prettier/parser-typescript.d.ts | 6 +- node_modules/@types/prettier/parser-yaml.d.ts | 6 +- node_modules/@types/prettier/standalone.d.ts | 9 +- node_modules/@types/stack-utils/LICENSE | 0 node_modules/@types/stack-utils/README.md | 71 +- node_modules/@types/stack-utils/index.d.ts | 30 +- node_modules/@types/stack-utils/package.json | 74 +- node_modules/@types/yargs-parser/LICENSE | 0 node_modules/@types/yargs-parser/README.md | 2 +- node_modules/@types/yargs-parser/index.d.ts | 40 +- node_modules/@types/yargs-parser/package.json | 74 +- node_modules/@types/yargs/LICENSE | 0 node_modules/@types/yargs/README.md | 6 +- node_modules/@types/yargs/helpers.d.mts | 1 + node_modules/@types/yargs/helpers.d.ts | 5 + node_modules/@types/yargs/index.d.mts | 46 + node_modules/@types/yargs/index.d.ts | 322 +- node_modules/@types/yargs/package.json | 161 +- node_modules/@types/yargs/yargs.d.ts | 2 +- node_modules/abab/CHANGELOG.md | 45 - node_modules/abab/LICENSE.md | 13 - node_modules/abab/README.md | 51 - node_modules/abab/index.d.ts | 2 - node_modules/abab/index.js | 9 - node_modules/abab/lib/atob.js | 97 - node_modules/abab/lib/btoa.js | 58 - node_modules/abab/package.json | 71 - node_modules/acorn-globals/LICENSE | 19 - node_modules/acorn-globals/README.md | 81 - node_modules/acorn-globals/index.js | 179 - node_modules/acorn-globals/package.json | 66 - node_modules/acorn-walk/CHANGELOG.md | 131 - node_modules/acorn-walk/LICENSE | 19 - node_modules/acorn-walk/README.md | 126 - node_modules/acorn-walk/dist/walk.d.ts | 112 - node_modules/acorn-walk/dist/walk.js | 463 - node_modules/acorn-walk/dist/walk.js.map | 1 - node_modules/acorn-walk/dist/walk.mjs | 443 - node_modules/acorn-walk/dist/walk.mjs.map | 1 - node_modules/acorn-walk/package.json | 64 - node_modules/ansi-regex/index.js | 2 +- node_modules/ansi-regex/package.json | 139 +- node_modules/ansi-regex/readme.md | 2 +- node_modules/anymatch/index.d.ts | 1 + node_modules/anymatch/index.js | 6 +- node_modules/anymatch/package.json | 74 +- node_modules/arr-diff/LICENSE | 21 - node_modules/arr-diff/README.md | 130 - node_modules/arr-diff/index.js | 47 - node_modules/arr-diff/package.json | 109 - 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/arr-union/LICENSE | 21 - node_modules/arr-union/README.md | 99 - node_modules/arr-union/index.js | 29 - node_modules/arr-union/package.json | 108 - node_modules/array-unique/LICENSE | 21 - node_modules/array-unique/README.md | 77 - node_modules/array-unique/index.js | 43 - node_modules/array-unique/package.json | 96 - node_modules/asn1/LICENSE | 19 - node_modules/asn1/README.md | 50 - node_modules/asn1/lib/ber/errors.js | 13 - node_modules/asn1/lib/ber/index.js | 27 - node_modules/asn1/lib/ber/reader.js | 262 - node_modules/asn1/lib/ber/types.js | 36 - node_modules/asn1/lib/ber/writer.js | 317 - node_modules/asn1/lib/index.js | 20 - node_modules/asn1/package.json | 75 - node_modules/assert-plus/AUTHORS | 6 - node_modules/assert-plus/CHANGES.md | 14 - node_modules/assert-plus/README.md | 162 - node_modules/assert-plus/assert.js | 211 - node_modules/assert-plus/package.json | 87 - node_modules/assign-symbols/LICENSE | 21 - node_modules/assign-symbols/README.md | 73 - node_modules/assign-symbols/index.js | 40 - node_modules/assign-symbols/package.json | 71 - node_modules/asynckit/LICENSE | 21 - node_modules/asynckit/README.md | 233 - node_modules/asynckit/bench.js | 76 - node_modules/asynckit/index.js | 6 - node_modules/asynckit/lib/abort.js | 29 - node_modules/asynckit/lib/async.js | 34 - node_modules/asynckit/lib/defer.js | 26 - node_modules/asynckit/lib/iterate.js | 75 - .../asynckit/lib/readable_asynckit.js | 91 - .../asynckit/lib/readable_parallel.js | 25 - node_modules/asynckit/lib/readable_serial.js | 25 - .../asynckit/lib/readable_serial_ordered.js | 29 - node_modules/asynckit/lib/state.js | 37 - node_modules/asynckit/lib/streamify.js | 141 - node_modules/asynckit/lib/terminator.js | 29 - node_modules/asynckit/package.json | 91 - node_modules/asynckit/parallel.js | 43 - node_modules/asynckit/serial.js | 17 - node_modules/asynckit/serialOrdered.js | 75 - node_modules/asynckit/stream.js | 21 - node_modules/atob/LICENSE | 230 - node_modules/atob/LICENSE.DOCS | 319 - node_modules/atob/README.md | 49 - node_modules/atob/bin/atob.js | 6 - node_modules/atob/bower.json | 24 - node_modules/atob/browser-atob.js | 44 - node_modules/atob/node-atob.js | 7 - node_modules/atob/package.json | 53 - node_modules/atob/test.js | 18 - node_modules/aws-sign2/LICENSE | 55 - node_modules/aws-sign2/README.md | 4 - node_modules/aws-sign2/index.js | 212 - node_modules/aws-sign2/package.json | 50 - node_modules/aws4/.github/FUNDING.yml | 3 - node_modules/aws4/.travis.yml | 9 - node_modules/aws4/LICENSE | 19 - node_modules/aws4/README.md | 183 - node_modules/aws4/aws4.js | 373 - node_modules/aws4/lru.js | 96 - node_modules/aws4/package.json | 53 - node_modules/babel-jest/LICENSE | 2 +- node_modules/babel-jest/build/index.d.ts | 27 +- node_modules/babel-jest/build/index.js | 359 +- .../babel-jest/build/loadBabelConfig.d.ts | 7 - .../babel-jest/build/loadBabelConfig.js | 9 +- node_modules/babel-jest/package.json | 79 +- .../babel-plugin-istanbul/CHANGELOG.md | 14 + node_modules/babel-plugin-istanbul/README.md | 2 - .../lib/load-nyc-config-sync.js | 4 +- .../babel-plugin-istanbul/package.json | 92 +- node_modules/babel-plugin-jest-hoist/LICENSE | 2 +- .../babel-plugin-jest-hoist/README.md | 2 +- .../babel-plugin-jest-hoist/build/index.d.ts | 18 +- .../babel-plugin-jest-hoist/build/index.js | 320 +- .../babel-plugin-jest-hoist/package.json | 68 +- node_modules/babel-preset-jest/LICENSE | 2 +- node_modules/babel-preset-jest/README.md | 2 +- node_modules/babel-preset-jest/index.js | 2 +- node_modules/babel-preset-jest/package.json | 58 +- node_modules/base/LICENSE | 21 - node_modules/base/README.md | 491 - node_modules/base/index.js | 435 - .../base/node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 93 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 110 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 109 - .../base/node_modules/is-descriptor/LICENSE | 21 - .../base/node_modules/is-descriptor/README.md | 193 - .../base/node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 114 - node_modules/base/package.json | 164 - node_modules/bcrypt-pbkdf/CONTRIBUTING.md | 13 - node_modules/bcrypt-pbkdf/LICENSE | 66 - node_modules/bcrypt-pbkdf/README.md | 45 - node_modules/bcrypt-pbkdf/index.js | 556 - node_modules/bcrypt-pbkdf/package.json | 44 - node_modules/browser-process-hrtime/LICENSE | 9 - node_modules/browser-process-hrtime/README.md | 27 - .../browser-process-hrtime/index.d.ts | 4 - node_modules/browser-process-hrtime/index.js | 28 - .../browser-process-hrtime/package.json | 46 - node_modules/browserslist/CHANGELOG.md | 514 - node_modules/browserslist/README.md | 681 +- node_modules/browserslist/browser.js | 30 +- node_modules/browserslist/cli.js | 46 +- node_modules/browserslist/error.d.ts | 8 +- node_modules/browserslist/error.js | 2 +- node_modules/browserslist/index.d.ts | 40 +- node_modules/browserslist/index.js | 938 +- node_modules/browserslist/node.js | 155 +- node_modules/browserslist/package.json | 92 +- node_modules/browserslist/parse.js | 78 + node_modules/browserslist/update-db.js | 293 - node_modules/buffer-from/index.js | 3 + node_modules/buffer-from/package.json | 53 +- node_modules/cache-base/LICENSE | 21 - node_modules/cache-base/README.md | 291 - node_modules/cache-base/index.js | 261 - node_modules/cache-base/package.json | 118 - node_modules/caniuse-lite/CHANGELOG.md | 483 - node_modules/caniuse-lite/README.md | 103 +- node_modules/caniuse-lite/data/agents.js | 2 +- .../caniuse-lite/data/browserVersions.js | 2 +- node_modules/caniuse-lite/data/features.js | 2 +- .../caniuse-lite/data/features/aac.js | 2 +- .../data/features/abortcontroller.js | 2 +- .../caniuse-lite/data/features/ac3-ec3.js | 2 +- .../data/features/accelerometer.js | 2 +- .../data/features/addeventlistener.js | 2 +- .../data/features/alternate-stylesheet.js | 2 +- .../data/features/ambient-light.js | 2 +- .../caniuse-lite/data/features/apng.js | 2 +- .../data/features/array-find-index.js | 2 +- .../caniuse-lite/data/features/array-find.js | 2 +- .../caniuse-lite/data/features/array-flat.js | 2 +- .../data/features/array-includes.js | 2 +- .../data/features/arrow-functions.js | 2 +- .../caniuse-lite/data/features/asmjs.js | 2 +- .../data/features/async-clipboard.js | 2 +- .../data/features/async-functions.js | 2 +- .../async-iterations-and-generators.js | 1 - .../caniuse-lite/data/features/atob-btoa.js | 2 +- .../caniuse-lite/data/features/audio-api.js | 2 +- .../caniuse-lite/data/features/audio.js | 2 +- .../caniuse-lite/data/features/audiotracks.js | 2 +- .../caniuse-lite/data/features/autofocus.js | 2 +- .../caniuse-lite/data/features/aux-click.js | 1 - .../caniuse-lite/data/features/auxclick.js | 2 +- .../caniuse-lite/data/features/av1.js | 2 +- .../caniuse-lite/data/features/avif.js | 2 +- .../data/features/background-attachment.js | 2 +- .../data/features/background-clip-text.js | 2 +- .../data/features/background-img-opts.js | 2 +- .../data/features/background-position-x-y.js | 2 +- .../features/background-repeat-round-space.js | 2 +- .../data/features/background-sync.js | 2 +- .../data/features/battery-status.js | 2 +- .../caniuse-lite/data/features/beacon.js | 2 +- .../data/features/beforeafterprint.js | 2 +- .../caniuse-lite/data/features/bigint.js | 2 +- .../caniuse-lite/data/features/blobbuilder.js | 2 +- .../caniuse-lite/data/features/bloburls.js | 2 +- .../data/features/border-image.js | 2 +- .../data/features/border-radius.js | 2 +- .../data/features/broadcastchannel.js | 2 +- .../caniuse-lite/data/features/brotli.js | 2 +- .../caniuse-lite/data/features/calc.js | 2 +- .../data/features/canvas-blending.js | 2 +- .../caniuse-lite/data/features/canvas-text.js | 2 +- .../caniuse-lite/data/features/canvas.js | 2 +- .../caniuse-lite/data/features/ch-unit.js | 2 +- .../data/features/chacha20-poly1305.js | 2 +- .../data/features/channel-messaging.js | 2 +- .../data/features/childnode-remove.js | 2 +- .../caniuse-lite/data/features/classlist.js | 2 +- .../data/features/clear-site-data-header.js | 1 - .../client-hints-dpr-width-viewport.js | 2 +- .../caniuse-lite/data/features/clipboard.js | 2 +- .../caniuse-lite/data/features/colr-v1.js | 1 + .../caniuse-lite/data/features/colr.js | 1 + .../data/features/comparedocumentposition.js | 2 +- .../data/features/console-basic.js | 2 +- .../data/features/console-time.js | 2 +- .../caniuse-lite/data/features/const.js | 2 +- .../data/features/constraint-validation.js | 2 +- .../data/features/contenteditable.js | 2 +- .../data/features/contentsecuritypolicy.js | 2 +- .../data/features/contentsecuritypolicy2.js | 2 +- .../data/features/cookie-store-api.js | 2 +- .../caniuse-lite/data/features/cors.js | 2 +- .../data/features/createimagebitmap.js | 2 +- .../data/features/credential-management.js | 2 +- .../data/features/cryptography.js | 2 +- .../caniuse-lite/data/features/css-all.js | 2 +- .../data/features/css-animation.js | 2 +- .../data/features/css-any-link.js | 2 +- .../data/features/css-appearance.js | 2 +- .../data/features/css-apply-rule.js | 1 - .../data/features/css-at-counter-style.js | 2 +- .../data/features/css-autofill.js | 1 + .../data/features/css-backdrop-filter.js | 2 +- .../data/features/css-background-offsets.js | 2 +- .../data/features/css-backgroundblendmode.js | 2 +- .../data/features/css-boxdecorationbreak.js | 2 +- .../data/features/css-boxshadow.js | 2 +- .../caniuse-lite/data/features/css-canvas.js | 2 +- .../data/features/css-caret-color.js | 2 +- .../data/features/css-cascade-layers.js | 1 + .../data/features/css-case-insensitive.js | 2 +- .../data/features/css-clip-path.js | 2 +- .../data/features/css-color-adjust.js | 2 +- .../data/features/css-color-function.js | 2 +- .../data/features/css-conic-gradients.js | 2 +- .../features/css-container-queries-style.js | 1 + .../data/features/css-container-queries.js | 1 + .../features/css-container-query-units.js | 1 + .../data/features/css-containment.js | 2 +- .../data/features/css-content-visibility.js | 2 +- .../data/features/css-counters.js | 2 +- .../data/features/css-crisp-edges.js | 2 +- .../data/features/css-cross-fade.js | 2 +- .../data/features/css-default-pseudo.js | 2 +- .../data/features/css-descendant-gtgt.js | 2 +- .../data/features/css-deviceadaptation.js | 2 +- .../data/features/css-dir-pseudo.js | 2 +- .../data/features/css-display-contents.js | 2 +- .../data/features/css-element-function.js | 2 +- .../data/features/css-env-function.js | 2 +- .../data/features/css-exclusions.js | 2 +- .../data/features/css-featurequeries.js | 2 +- .../data/features/css-file-selector-button.js | 1 + .../data/features/css-filter-function.js | 2 +- .../caniuse-lite/data/features/css-filters.js | 2 +- .../data/features/css-first-letter.js | 2 +- .../data/features/css-first-line.js | 2 +- .../caniuse-lite/data/features/css-fixed.js | 2 +- .../data/features/css-focus-ring.js | 1 - .../data/features/css-focus-visible.js | 2 +- .../data/features/css-focus-within.js | 2 +- .../data/features/css-font-palette.js | 1 + .../features/css-font-rendering-controls.js | 2 +- .../data/features/css-font-stretch.js | 2 +- .../data/features/css-gencontent.js | 2 +- .../data/features/css-gradients.js | 2 +- .../data/features/css-grid-animation.js | 1 + .../caniuse-lite/data/features/css-grid.js | 2 +- .../data/features/css-hanging-punctuation.js | 2 +- .../caniuse-lite/data/features/css-has.js | 2 +- .../data/features/css-hyphenate.js | 1 - .../caniuse-lite/data/features/css-hyphens.js | 2 +- .../data/features/css-image-orientation.js | 2 +- .../data/features/css-image-set.js | 2 +- .../data/features/css-in-out-of-range.js | 2 +- .../data/features/css-indeterminate-pseudo.js | 2 +- .../data/features/css-initial-letter.js | 2 +- .../data/features/css-initial-value.js | 2 +- .../caniuse-lite/data/features/css-lch-lab.js | 1 + .../data/features/css-letter-spacing.js | 2 +- .../data/features/css-line-clamp.js | 2 +- .../data/features/css-logical-props.js | 2 +- .../data/features/css-marker-pseudo.js | 2 +- .../caniuse-lite/data/features/css-masks.js | 2 +- .../data/features/css-matches-pseudo.js | 2 +- .../data/features/css-math-functions.js | 2 +- .../data/features/css-media-interaction.js | 2 +- .../data/features/css-media-range-syntax.js | 1 + .../data/features/css-media-resolution.js | 2 +- .../data/features/css-media-scripting.js | 2 +- .../data/features/css-mediaqueries.js | 2 +- .../data/features/css-mixblendmode.js | 2 +- .../data/features/css-motion-paths.js | 2 +- .../data/features/css-namespaces.js | 2 +- .../caniuse-lite/data/features/css-nesting.js | 1 + .../data/features/css-not-sel-list.js | 2 +- .../data/features/css-nth-child-of.js | 2 +- .../caniuse-lite/data/features/css-opacity.js | 2 +- .../data/features/css-optional-pseudo.js | 2 +- .../data/features/css-overflow-anchor.js | 2 +- .../data/features/css-overflow-overlay.js | 2 +- .../data/features/css-overflow.js | 2 +- .../data/features/css-overscroll-behavior.js | 2 +- .../data/features/css-page-break.js | 2 +- .../data/features/css-paged-media.js | 2 +- .../data/features/css-paint-api.js | 2 +- .../data/features/css-placeholder-shown.js | 2 +- .../data/features/css-placeholder.js | 2 +- .../data/features/css-print-color-adjust.js | 1 + .../data/features/css-read-only-write.js | 2 +- .../data/features/css-rebeccapurple.js | 2 +- .../data/features/css-reflections.js | 2 +- .../caniuse-lite/data/features/css-regions.js | 2 +- .../data/features/css-relative-colors.js | 1 + .../data/features/css-repeating-gradients.js | 2 +- .../caniuse-lite/data/features/css-resize.js | 2 +- .../data/features/css-revert-value.js | 2 +- .../data/features/css-rrggbbaa.js | 2 +- .../data/features/css-scroll-behavior.js | 2 +- .../data/features/css-scroll-timeline.js | 2 +- .../data/features/css-scrollbar.js | 2 +- .../caniuse-lite/data/features/css-sel2.js | 2 +- .../caniuse-lite/data/features/css-sel3.js | 2 +- .../data/features/css-selection.js | 2 +- .../caniuse-lite/data/features/css-shapes.js | 2 +- .../data/features/css-snappoints.js | 2 +- .../caniuse-lite/data/features/css-sticky.js | 2 +- .../caniuse-lite/data/features/css-subgrid.js | 2 +- .../data/features/css-supports-api.js | 2 +- .../caniuse-lite/data/features/css-table.js | 2 +- .../data/features/css-text-align-last.js | 2 +- .../data/features/css-text-box-trim.js | 1 + .../data/features/css-text-indent.js | 2 +- .../data/features/css-text-justify.js | 2 +- .../data/features/css-text-orientation.js | 2 +- .../data/features/css-text-spacing.js | 2 +- .../data/features/css-textshadow.js | 2 +- .../data/features/css-touch-action-2.js | 1 - .../data/features/css-touch-action.js | 2 +- .../data/features/css-transitions.js | 2 +- .../data/features/css-unicode-bidi.js | 2 +- .../data/features/css-unset-value.js | 2 +- .../data/features/css-variables.js | 2 +- .../data/features/css-when-else.js | 1 + .../data/features/css-widows-orphans.js | 2 +- .../data/features/css-width-stretch.js | 1 + .../data/features/css-writing-mode.js | 2 +- .../caniuse-lite/data/features/css-zoom.js | 2 +- .../caniuse-lite/data/features/css3-attr.js | 2 +- .../data/features/css3-boxsizing.js | 2 +- .../caniuse-lite/data/features/css3-colors.js | 2 +- .../data/features/css3-cursors-grab.js | 2 +- .../data/features/css3-cursors-newer.js | 2 +- .../data/features/css3-cursors.js | 2 +- .../data/features/css3-tabsize.js | 2 +- .../data/features/currentcolor.js | 2 +- .../data/features/custom-elements.js | 2 +- .../data/features/custom-elementsv1.js | 2 +- .../caniuse-lite/data/features/customevent.js | 2 +- .../caniuse-lite/data/features/datalist.js | 2 +- .../caniuse-lite/data/features/dataset.js | 2 +- .../caniuse-lite/data/features/datauri.js | 2 +- .../data/features/date-tolocaledatestring.js | 2 +- .../data/features/declarative-shadow-dom.js | 1 + .../caniuse-lite/data/features/decorators.js | 1 + .../caniuse-lite/data/features/details.js | 2 +- .../data/features/deviceorientation.js | 2 +- .../data/features/devicepixelratio.js | 2 +- .../caniuse-lite/data/features/dialog.js | 2 +- .../data/features/dispatchevent.js | 2 +- .../caniuse-lite/data/features/dnssec.js | 2 +- .../data/features/do-not-track.js | 2 +- .../data/features/document-currentscript.js | 2 +- .../data/features/document-evaluate-xpath.js | 2 +- .../data/features/document-execcommand.js | 2 +- .../data/features/document-policy.js | 2 +- .../features/document-scrollingelement.js | 2 +- .../data/features/documenthead.js | 2 +- .../data/features/dom-manip-convenience.js | 2 +- .../caniuse-lite/data/features/dom-range.js | 2 +- .../data/features/domcontentloaded.js | 2 +- .../features/domfocusin-domfocusout-events.js | 1 - .../caniuse-lite/data/features/dommatrix.js | 2 +- .../caniuse-lite/data/features/download.js | 2 +- .../caniuse-lite/data/features/dragndrop.js | 2 +- .../data/features/element-closest.js | 2 +- .../data/features/element-from-point.js | 2 +- .../data/features/element-scroll-methods.js | 2 +- .../caniuse-lite/data/features/eme.js | 2 +- .../caniuse-lite/data/features/eot.js | 2 +- .../caniuse-lite/data/features/es5.js | 2 +- .../caniuse-lite/data/features/es6-class.js | 2 +- .../data/features/es6-generators.js | 2 +- .../features/es6-module-dynamic-import.js | 2 +- .../data/features/es6-module-nomodule.js | 1 - .../caniuse-lite/data/features/es6-module.js | 2 +- .../caniuse-lite/data/features/es6-number.js | 2 +- .../data/features/es6-string-includes.js | 2 +- .../caniuse-lite/data/features/es6.js | 2 +- .../caniuse-lite/data/features/eventsource.js | 2 +- .../data/features/extended-system-fonts.js | 2 +- .../data/features/feature-policy.js | 2 +- .../caniuse-lite/data/features/fetch.js | 2 +- .../data/features/fieldset-disabled.js | 2 +- .../caniuse-lite/data/features/fileapi.js | 2 +- .../caniuse-lite/data/features/filereader.js | 2 +- .../data/features/filereadersync.js | 2 +- .../caniuse-lite/data/features/filesystem.js | 2 +- .../caniuse-lite/data/features/flac.js | 2 +- .../caniuse-lite/data/features/flexbox-gap.js | 2 +- .../caniuse-lite/data/features/flexbox.js | 2 +- .../caniuse-lite/data/features/flow-root.js | 2 +- .../data/features/focusin-focusout-events.js | 2 +- .../features/focusoptions-preventscroll.js | 1 - .../data/features/font-family-system-ui.js | 2 +- .../data/features/font-feature.js | 2 +- .../data/features/font-kerning.js | 2 +- .../data/features/font-loading.js | 2 +- .../data/features/font-metrics-overrides.js | 1 - .../data/features/font-size-adjust.js | 2 +- .../caniuse-lite/data/features/font-smooth.js | 2 +- .../data/features/font-unicode-range.js | 2 +- .../data/features/font-variant-alternates.js | 2 +- .../data/features/font-variant-east-asian.js | 1 - .../data/features/font-variant-numeric.js | 2 +- .../caniuse-lite/data/features/fontface.js | 2 +- .../data/features/form-attribute.js | 2 +- .../data/features/form-submit-attributes.js | 2 +- .../data/features/form-validation.js | 2 +- .../caniuse-lite/data/features/forms.js | 2 +- .../caniuse-lite/data/features/fullscreen.js | 2 +- .../caniuse-lite/data/features/gamepad.js | 2 +- .../caniuse-lite/data/features/geolocation.js | 2 +- .../data/features/getboundingclientrect.js | 2 +- .../data/features/getcomputedstyle.js | 2 +- .../data/features/getelementsbyclassname.js | 2 +- .../data/features/getrandomvalues.js | 2 +- .../caniuse-lite/data/features/gyroscope.js | 2 +- .../data/features/hardwareconcurrency.js | 2 +- .../caniuse-lite/data/features/hashchange.js | 2 +- .../caniuse-lite/data/features/heif.js | 2 +- .../caniuse-lite/data/features/hevc.js | 2 +- .../caniuse-lite/data/features/hidden.js | 2 +- .../data/features/high-resolution-time.js | 2 +- .../caniuse-lite/data/features/history.js | 2 +- .../data/features/html-media-capture.js | 2 +- .../data/features/html5semantic.js | 2 +- .../data/features/http-live-streaming.js | 2 +- .../caniuse-lite/data/features/http2.js | 2 +- .../caniuse-lite/data/features/http3.js | 2 +- .../data/features/iframe-sandbox.js | 2 +- .../data/features/iframe-seamless.js | 2 +- .../data/features/iframe-srcdoc.js | 2 +- .../data/features/imagecapture.js | 2 +- .../caniuse-lite/data/features/ime.js | 2 +- .../img-naturalwidth-naturalheight.js | 2 +- .../caniuse-lite/data/features/import-maps.js | 2 +- .../caniuse-lite/data/features/imports.js | 2 +- .../data/features/indeterminate-checkbox.js | 2 +- .../caniuse-lite/data/features/indexeddb.js | 2 +- .../caniuse-lite/data/features/indexeddb2.js | 2 +- .../data/features/inline-block.js | 2 +- .../caniuse-lite/data/features/innertext.js | 2 +- .../data/features/input-autocomplete-onoff.js | 2 +- .../caniuse-lite/data/features/input-color.js | 2 +- .../data/features/input-datetime.js | 2 +- .../data/features/input-email-tel-url.js | 2 +- .../caniuse-lite/data/features/input-event.js | 2 +- .../data/features/input-file-accept.js | 2 +- .../data/features/input-file-directory.js | 2 +- .../data/features/input-file-multiple.js | 2 +- .../data/features/input-inputmode.js | 2 +- .../data/features/input-minlength.js | 2 +- .../data/features/input-number.js | 2 +- .../data/features/input-pattern.js | 2 +- .../data/features/input-placeholder.js | 2 +- .../caniuse-lite/data/features/input-range.js | 2 +- .../data/features/input-search.js | 2 +- .../data/features/input-selection.js | 2 +- .../data/features/insert-adjacent.js | 2 +- .../data/features/insertadjacenthtml.js | 2 +- .../internationalization-plural-rul.js | 1 - .../data/features/internationalization.js | 2 +- .../data/features/intersectionobserver-v2.js | 2 +- .../data/features/intersectionobserver.js | 2 +- .../data/features/intl-pluralrules.js | 2 +- .../data/features/intrinsic-width.js | 2 +- .../caniuse-lite/data/features/jpeg2000.js | 2 +- .../caniuse-lite/data/features/jpegxl.js | 2 +- .../caniuse-lite/data/features/jpegxr.js | 2 +- .../data/features/js-regexp-lookbehind.js | 2 +- .../caniuse-lite/data/features/json.js | 2 +- .../features/justify-content-space-evenly.js | 2 +- .../data/features/kerning-pairs-ligatures.js | 2 +- .../data/features/keyboardevent-charcode.js | 2 +- .../data/features/keyboardevent-code.js | 2 +- .../keyboardevent-getmodifierstate.js | 2 +- .../data/features/keyboardevent-key.js | 2 +- .../data/features/keyboardevent-location.js | 2 +- .../data/features/keyboardevent-which.js | 2 +- .../caniuse-lite/data/features/lazyload.js | 2 +- .../caniuse-lite/data/features/let.js | 2 +- .../data/features/link-icon-png.js | 2 +- .../data/features/link-icon-svg.js | 2 +- .../data/features/link-rel-dns-prefetch.js | 2 +- .../data/features/link-rel-modulepreload.js | 2 +- .../data/features/link-rel-preconnect.js | 2 +- .../data/features/link-rel-prefetch.js | 2 +- .../data/features/link-rel-preload.js | 2 +- .../data/features/link-rel-prerender.js | 2 +- .../data/features/loading-lazy-attr.js | 2 +- .../data/features/localecompare.js | 2 +- .../data/features/magnetometer.js | 2 +- .../data/features/matchesselector.js | 2 +- .../caniuse-lite/data/features/matchmedia.js | 2 +- .../caniuse-lite/data/features/mathml.js | 2 +- .../caniuse-lite/data/features/maxlength.js | 2 +- .../mdn-css-unicode-bidi-isolate-override.js | 1 + .../features/mdn-css-unicode-bidi-isolate.js | 1 + .../mdn-css-unicode-bidi-plaintext.js | 1 + .../features/mdn-text-decoration-color.js | 1 + .../data/features/mdn-text-decoration-line.js | 1 + .../features/mdn-text-decoration-shorthand.js | 1 + .../features/mdn-text-decoration-style.js | 1 + .../data/features/media-attribute.js | 1 - .../data/features/media-fragments.js | 2 +- .../data/features/media-session-api.js | 1 - .../data/features/mediacapture-fromelement.js | 2 +- .../data/features/mediarecorder.js | 2 +- .../caniuse-lite/data/features/mediasource.js | 2 +- .../caniuse-lite/data/features/menu.js | 2 +- .../data/features/meta-theme-color.js | 2 +- .../caniuse-lite/data/features/meter.js | 2 +- .../caniuse-lite/data/features/midi.js | 2 +- .../caniuse-lite/data/features/minmaxwh.js | 2 +- .../caniuse-lite/data/features/mp3.js | 2 +- .../caniuse-lite/data/features/mpeg-dash.js | 2 +- .../caniuse-lite/data/features/mpeg4.js | 2 +- .../data/features/multibackgrounds.js | 2 +- .../caniuse-lite/data/features/multicolumn.js | 2 +- .../data/features/mutation-events.js | 2 +- .../data/features/mutationobserver.js | 2 +- .../data/features/namevalue-storage.js | 2 +- .../data/features/native-filesystem-api.js | 2 +- .../caniuse-lite/data/features/nav-timing.js | 2 +- .../data/features/navigator-language.js | 1 - .../caniuse-lite/data/features/netinfo.js | 2 +- .../data/features/node-contains.js | 1 - .../data/features/node-parentelement.js | 1 - .../data/features/notifications.js | 2 +- .../data/features/object-entries.js | 2 +- .../caniuse-lite/data/features/object-fit.js | 2 +- .../data/features/object-observe.js | 2 +- .../data/features/object-values.js | 2 +- .../caniuse-lite/data/features/objectrtc.js | 2 +- .../data/features/offline-apps.js | 2 +- .../data/features/offscreencanvas.js | 2 +- .../caniuse-lite/data/features/ogg-vorbis.js | 2 +- .../caniuse-lite/data/features/ogv.js | 2 +- .../caniuse-lite/data/features/ol-reversed.js | 2 +- .../data/features/once-event-listener.js | 2 +- .../data/features/online-status.js | 2 +- .../caniuse-lite/data/features/opus.js | 2 +- .../data/features/orientation-sensor.js | 2 +- .../caniuse-lite/data/features/outline.js | 2 +- .../data/features/pad-start-end.js | 2 +- .../data/features/page-transition-events.js | 2 +- .../data/features/pagevisibility.js | 2 +- .../data/features/passive-event-listener.js | 2 +- .../data/features/passwordrules.js | 2 +- .../caniuse-lite/data/features/path2d.js | 2 +- .../data/features/payment-request.js | 2 +- .../caniuse-lite/data/features/pdf-viewer.js | 2 +- .../data/features/permissions-api.js | 2 +- .../data/features/permissions-policy.js | 2 +- .../data/features/picture-in-picture.js | 2 +- .../caniuse-lite/data/features/picture.js | 2 +- .../caniuse-lite/data/features/ping.js | 2 +- .../caniuse-lite/data/features/png-alpha.js | 2 +- .../data/features/pointer-events.js | 2 +- .../caniuse-lite/data/features/pointer.js | 2 +- .../caniuse-lite/data/features/pointerlock.js | 2 +- .../caniuse-lite/data/features/portals.js | 2 +- .../data/features/prefers-color-scheme.js | 2 +- .../data/features/prefers-reduced-motion.js | 2 +- .../data/features/private-class-fields.js | 1 - .../features/private-methods-and-accessors.js | 1 - .../caniuse-lite/data/features/progress.js | 2 +- .../data/features/promise-finally.js | 2 +- .../caniuse-lite/data/features/promises.js | 2 +- .../caniuse-lite/data/features/proximity.js | 2 +- .../caniuse-lite/data/features/proxy.js | 2 +- .../data/features/public-class-fields.js | 1 - .../data/features/publickeypinning.js | 2 +- .../caniuse-lite/data/features/push-api.js | 2 +- .../data/features/queryselector.js | 2 +- .../data/features/readonly-attr.js | 2 +- .../data/features/referrer-policy.js | 2 +- .../data/features/registerprotocolhandler.js | 2 +- .../data/features/rel-noopener.js | 2 +- .../data/features/rel-noreferrer.js | 2 +- .../caniuse-lite/data/features/rellist.js | 2 +- .../caniuse-lite/data/features/rem.js | 2 +- .../caniuse-lite/data/features/replace-all.js | 1 - .../data/features/requestanimationframe.js | 2 +- .../data/features/requestidlecallback.js | 2 +- .../data/features/resizeobserver.js | 2 +- .../data/features/resource-timing.js | 2 +- .../data/features/rest-parameters.js | 2 +- .../data/features/rtcpeerconnection.js | 2 +- .../caniuse-lite/data/features/ruby.js | 2 +- .../caniuse-lite/data/features/run-in.js | 2 +- .../features/same-site-cookie-attribute.js | 2 +- .../data/features/screen-orientation.js | 2 +- .../data/features/script-async.js | 2 +- .../data/features/script-defer.js | 2 +- .../data/features/scrollintoview.js | 2 +- .../data/features/scrollintoviewifneeded.js | 2 +- .../caniuse-lite/data/features/sdch.js | 2 +- .../data/features/selection-api.js | 2 +- .../data/features/server-timing.js | 2 +- .../data/features/serviceworkers.js | 2 +- .../data/features/setimmediate.js | 2 +- .../caniuse-lite/data/features/sha-2.js | 1 - .../caniuse-lite/data/features/shadowdom.js | 2 +- .../caniuse-lite/data/features/shadowdomv1.js | 2 +- .../data/features/sharedarraybuffer.js | 2 +- .../data/features/sharedworkers.js | 2 +- .../caniuse-lite/data/features/sni.js | 2 +- .../caniuse-lite/data/features/spdy.js | 2 +- .../data/features/speech-recognition.js | 2 +- .../data/features/speech-synthesis.js | 2 +- .../data/features/spellcheck-attribute.js | 2 +- .../caniuse-lite/data/features/sql-storage.js | 2 +- .../caniuse-lite/data/features/srcset.js | 2 +- .../data/features/stopimmediatepropagation.js | 1 - .../caniuse-lite/data/features/stream.js | 2 +- .../caniuse-lite/data/features/streams.js | 2 +- .../data/features/stricttransportsecurity.js | 2 +- .../data/features/style-scoped.js | 2 +- .../data/features/subresource-bundling.js | 1 + .../data/features/subresource-integrity.js | 2 +- .../caniuse-lite/data/features/svg-css.js | 2 +- .../caniuse-lite/data/features/svg-filters.js | 2 +- .../caniuse-lite/data/features/svg-fonts.js | 2 +- .../data/features/svg-fragment.js | 2 +- .../caniuse-lite/data/features/svg-html.js | 2 +- .../caniuse-lite/data/features/svg-html5.js | 2 +- .../caniuse-lite/data/features/svg-img.js | 2 +- .../caniuse-lite/data/features/svg-smil.js | 2 +- .../caniuse-lite/data/features/svg.js | 2 +- .../caniuse-lite/data/features/sxg.js | 2 +- .../caniuse-lite/data/features/symbols.js | 1 - .../data/features/tabindex-attr.js | 2 +- .../data/features/template-literals.js | 2 +- .../caniuse-lite/data/features/template.js | 2 +- .../caniuse-lite/data/features/temporal.js | 1 + .../caniuse-lite/data/features/testfeat.js | 2 +- .../data/features/text-decoration.js | 2 +- .../data/features/text-emphasis.js | 2 +- .../data/features/text-overflow.js | 2 +- .../data/features/text-size-adjust.js | 2 +- .../caniuse-lite/data/features/text-stroke.js | 2 +- .../data/features/text-underline-offset.js | 1 - .../caniuse-lite/data/features/textcontent.js | 2 +- .../caniuse-lite/data/features/textencoder.js | 2 +- .../caniuse-lite/data/features/tls1-1.js | 2 +- .../caniuse-lite/data/features/tls1-2.js | 2 +- .../caniuse-lite/data/features/tls1-3.js | 2 +- .../data/features/token-binding.js | 1 - .../caniuse-lite/data/features/touch.js | 2 +- .../data/features/transforms2d.js | 2 +- .../data/features/transforms3d.js | 2 +- .../data/features/trusted-types.js | 2 +- .../caniuse-lite/data/features/ttf.js | 2 +- .../caniuse-lite/data/features/typedarrays.js | 2 +- .../caniuse-lite/data/features/u2f.js | 2 +- .../data/features/unhandledrejection.js | 2 +- .../data/features/upgradeinsecurerequests.js | 2 +- .../features/url-scroll-to-text-fragment.js | 2 +- .../caniuse-lite/data/features/url.js | 2 +- .../data/features/urlsearchparams.js | 2 +- .../caniuse-lite/data/features/use-strict.js | 2 +- .../data/features/user-select-none.js | 2 +- .../caniuse-lite/data/features/user-timing.js | 2 +- .../data/features/variable-fonts.js | 2 +- .../data/features/vector-effect.js | 1 + .../caniuse-lite/data/features/vibration.js | 2 +- .../caniuse-lite/data/features/video.js | 2 +- .../caniuse-lite/data/features/videotracks.js | 2 +- .../data/features/viewport-unit-variants.js | 1 + .../data/features/viewport-units.js | 2 +- .../caniuse-lite/data/features/wai-aria.js | 2 +- .../caniuse-lite/data/features/wake-lock.js | 2 +- .../caniuse-lite/data/features/wasm.js | 2 +- .../caniuse-lite/data/features/wav.js | 2 +- .../caniuse-lite/data/features/wbr-element.js | 2 +- .../data/features/web-animation.js | 2 +- .../data/features/web-app-manifest.js | 2 +- .../data/features/web-bluetooth.js | 2 +- .../caniuse-lite/data/features/web-serial.js | 2 +- .../caniuse-lite/data/features/web-share.js | 2 +- .../caniuse-lite/data/features/webauthn.js | 2 +- .../caniuse-lite/data/features/webcodecs.js | 1 + .../caniuse-lite/data/features/webgl.js | 2 +- .../caniuse-lite/data/features/webgl2.js | 2 +- .../caniuse-lite/data/features/webgpu.js | 2 +- .../caniuse-lite/data/features/webhid.js | 2 +- .../data/features/webkit-user-drag.js | 1 + .../caniuse-lite/data/features/webm.js | 2 +- .../caniuse-lite/data/features/webnfc.js | 2 +- .../caniuse-lite/data/features/webp.js | 2 +- .../caniuse-lite/data/features/websockets.js | 2 +- .../data/features/webtransport.js | 1 + .../caniuse-lite/data/features/webusb.js | 2 +- .../caniuse-lite/data/features/webvr.js | 2 +- .../caniuse-lite/data/features/webvtt.js | 2 +- .../caniuse-lite/data/features/webworkers.js | 2 +- .../caniuse-lite/data/features/webxr.js | 2 +- .../caniuse-lite/data/features/will-change.js | 2 +- .../caniuse-lite/data/features/woff.js | 2 +- .../caniuse-lite/data/features/woff2.js | 2 +- .../caniuse-lite/data/features/word-break.js | 2 +- .../caniuse-lite/data/features/wordwrap.js | 2 +- .../data/features/x-doc-messaging.js | 2 +- .../data/features/x-frame-options.js | 2 +- .../caniuse-lite/data/features/xhr2.js | 2 +- .../caniuse-lite/data/features/xhtml.js | 2 +- .../caniuse-lite/data/features/xhtmlsmil.js | 2 +- .../data/features/xml-serializer.js | 2 +- node_modules/caniuse-lite/data/regions/AD.js | 2 +- node_modules/caniuse-lite/data/regions/AE.js | 2 +- node_modules/caniuse-lite/data/regions/AF.js | 2 +- node_modules/caniuse-lite/data/regions/AG.js | 2 +- node_modules/caniuse-lite/data/regions/AI.js | 2 +- node_modules/caniuse-lite/data/regions/AL.js | 2 +- node_modules/caniuse-lite/data/regions/AM.js | 2 +- node_modules/caniuse-lite/data/regions/AN.js | 1 - node_modules/caniuse-lite/data/regions/AO.js | 2 +- node_modules/caniuse-lite/data/regions/AR.js | 2 +- node_modules/caniuse-lite/data/regions/AS.js | 2 +- node_modules/caniuse-lite/data/regions/AT.js | 2 +- node_modules/caniuse-lite/data/regions/AU.js | 2 +- node_modules/caniuse-lite/data/regions/AW.js | 2 +- node_modules/caniuse-lite/data/regions/AX.js | 2 +- node_modules/caniuse-lite/data/regions/AZ.js | 2 +- node_modules/caniuse-lite/data/regions/BA.js | 2 +- node_modules/caniuse-lite/data/regions/BB.js | 2 +- node_modules/caniuse-lite/data/regions/BD.js | 2 +- node_modules/caniuse-lite/data/regions/BE.js | 2 +- node_modules/caniuse-lite/data/regions/BF.js | 2 +- node_modules/caniuse-lite/data/regions/BG.js | 2 +- node_modules/caniuse-lite/data/regions/BH.js | 2 +- node_modules/caniuse-lite/data/regions/BI.js | 2 +- node_modules/caniuse-lite/data/regions/BJ.js | 2 +- node_modules/caniuse-lite/data/regions/BM.js | 2 +- node_modules/caniuse-lite/data/regions/BN.js | 2 +- node_modules/caniuse-lite/data/regions/BO.js | 2 +- node_modules/caniuse-lite/data/regions/BR.js | 2 +- node_modules/caniuse-lite/data/regions/BS.js | 2 +- node_modules/caniuse-lite/data/regions/BT.js | 2 +- node_modules/caniuse-lite/data/regions/BW.js | 2 +- node_modules/caniuse-lite/data/regions/BY.js | 2 +- node_modules/caniuse-lite/data/regions/BZ.js | 2 +- node_modules/caniuse-lite/data/regions/CA.js | 2 +- node_modules/caniuse-lite/data/regions/CD.js | 2 +- node_modules/caniuse-lite/data/regions/CF.js | 2 +- node_modules/caniuse-lite/data/regions/CG.js | 2 +- node_modules/caniuse-lite/data/regions/CH.js | 2 +- node_modules/caniuse-lite/data/regions/CI.js | 2 +- node_modules/caniuse-lite/data/regions/CK.js | 2 +- node_modules/caniuse-lite/data/regions/CL.js | 2 +- node_modules/caniuse-lite/data/regions/CM.js | 2 +- node_modules/caniuse-lite/data/regions/CN.js | 2 +- node_modules/caniuse-lite/data/regions/CO.js | 2 +- node_modules/caniuse-lite/data/regions/CR.js | 2 +- node_modules/caniuse-lite/data/regions/CU.js | 2 +- node_modules/caniuse-lite/data/regions/CV.js | 2 +- node_modules/caniuse-lite/data/regions/CX.js | 2 +- node_modules/caniuse-lite/data/regions/CY.js | 2 +- node_modules/caniuse-lite/data/regions/CZ.js | 2 +- node_modules/caniuse-lite/data/regions/DE.js | 2 +- node_modules/caniuse-lite/data/regions/DJ.js | 2 +- node_modules/caniuse-lite/data/regions/DK.js | 2 +- node_modules/caniuse-lite/data/regions/DM.js | 2 +- node_modules/caniuse-lite/data/regions/DO.js | 2 +- node_modules/caniuse-lite/data/regions/DZ.js | 2 +- node_modules/caniuse-lite/data/regions/EC.js | 2 +- node_modules/caniuse-lite/data/regions/EE.js | 2 +- node_modules/caniuse-lite/data/regions/EG.js | 2 +- node_modules/caniuse-lite/data/regions/ER.js | 2 +- node_modules/caniuse-lite/data/regions/ES.js | 2 +- node_modules/caniuse-lite/data/regions/ET.js | 2 +- node_modules/caniuse-lite/data/regions/FI.js | 2 +- node_modules/caniuse-lite/data/regions/FJ.js | 2 +- node_modules/caniuse-lite/data/regions/FK.js | 2 +- node_modules/caniuse-lite/data/regions/FM.js | 2 +- node_modules/caniuse-lite/data/regions/FO.js | 2 +- node_modules/caniuse-lite/data/regions/FR.js | 2 +- node_modules/caniuse-lite/data/regions/GA.js | 2 +- node_modules/caniuse-lite/data/regions/GB.js | 2 +- node_modules/caniuse-lite/data/regions/GD.js | 2 +- node_modules/caniuse-lite/data/regions/GE.js | 2 +- node_modules/caniuse-lite/data/regions/GF.js | 2 +- node_modules/caniuse-lite/data/regions/GG.js | 2 +- node_modules/caniuse-lite/data/regions/GH.js | 2 +- node_modules/caniuse-lite/data/regions/GI.js | 2 +- node_modules/caniuse-lite/data/regions/GL.js | 2 +- node_modules/caniuse-lite/data/regions/GM.js | 2 +- node_modules/caniuse-lite/data/regions/GN.js | 2 +- node_modules/caniuse-lite/data/regions/GP.js | 2 +- node_modules/caniuse-lite/data/regions/GQ.js | 2 +- node_modules/caniuse-lite/data/regions/GR.js | 2 +- node_modules/caniuse-lite/data/regions/GT.js | 2 +- node_modules/caniuse-lite/data/regions/GU.js | 2 +- node_modules/caniuse-lite/data/regions/GW.js | 2 +- node_modules/caniuse-lite/data/regions/GY.js | 2 +- node_modules/caniuse-lite/data/regions/HK.js | 2 +- node_modules/caniuse-lite/data/regions/HN.js | 2 +- node_modules/caniuse-lite/data/regions/HR.js | 2 +- node_modules/caniuse-lite/data/regions/HT.js | 2 +- node_modules/caniuse-lite/data/regions/HU.js | 2 +- node_modules/caniuse-lite/data/regions/ID.js | 2 +- node_modules/caniuse-lite/data/regions/IE.js | 2 +- node_modules/caniuse-lite/data/regions/IL.js | 2 +- node_modules/caniuse-lite/data/regions/IM.js | 2 +- node_modules/caniuse-lite/data/regions/IN.js | 2 +- node_modules/caniuse-lite/data/regions/IQ.js | 2 +- node_modules/caniuse-lite/data/regions/IR.js | 2 +- node_modules/caniuse-lite/data/regions/IS.js | 2 +- node_modules/caniuse-lite/data/regions/IT.js | 2 +- node_modules/caniuse-lite/data/regions/JE.js | 2 +- node_modules/caniuse-lite/data/regions/JM.js | 2 +- node_modules/caniuse-lite/data/regions/JO.js | 2 +- node_modules/caniuse-lite/data/regions/JP.js | 2 +- node_modules/caniuse-lite/data/regions/KE.js | 2 +- node_modules/caniuse-lite/data/regions/KG.js | 2 +- node_modules/caniuse-lite/data/regions/KH.js | 2 +- node_modules/caniuse-lite/data/regions/KI.js | 2 +- node_modules/caniuse-lite/data/regions/KM.js | 2 +- node_modules/caniuse-lite/data/regions/KN.js | 2 +- node_modules/caniuse-lite/data/regions/KP.js | 2 +- node_modules/caniuse-lite/data/regions/KR.js | 2 +- node_modules/caniuse-lite/data/regions/KW.js | 2 +- node_modules/caniuse-lite/data/regions/KY.js | 2 +- node_modules/caniuse-lite/data/regions/KZ.js | 2 +- node_modules/caniuse-lite/data/regions/LA.js | 2 +- node_modules/caniuse-lite/data/regions/LB.js | 2 +- node_modules/caniuse-lite/data/regions/LC.js | 2 +- node_modules/caniuse-lite/data/regions/LI.js | 2 +- node_modules/caniuse-lite/data/regions/LK.js | 2 +- node_modules/caniuse-lite/data/regions/LR.js | 2 +- node_modules/caniuse-lite/data/regions/LS.js | 2 +- node_modules/caniuse-lite/data/regions/LT.js | 2 +- node_modules/caniuse-lite/data/regions/LU.js | 2 +- node_modules/caniuse-lite/data/regions/LV.js | 2 +- node_modules/caniuse-lite/data/regions/LY.js | 2 +- node_modules/caniuse-lite/data/regions/MA.js | 2 +- node_modules/caniuse-lite/data/regions/MC.js | 2 +- node_modules/caniuse-lite/data/regions/MD.js | 2 +- node_modules/caniuse-lite/data/regions/ME.js | 2 +- node_modules/caniuse-lite/data/regions/MG.js | 2 +- node_modules/caniuse-lite/data/regions/MH.js | 2 +- node_modules/caniuse-lite/data/regions/MK.js | 2 +- node_modules/caniuse-lite/data/regions/ML.js | 2 +- node_modules/caniuse-lite/data/regions/MM.js | 2 +- node_modules/caniuse-lite/data/regions/MN.js | 2 +- node_modules/caniuse-lite/data/regions/MO.js | 2 +- node_modules/caniuse-lite/data/regions/MP.js | 2 +- node_modules/caniuse-lite/data/regions/MQ.js | 2 +- node_modules/caniuse-lite/data/regions/MR.js | 2 +- node_modules/caniuse-lite/data/regions/MS.js | 2 +- node_modules/caniuse-lite/data/regions/MT.js | 2 +- node_modules/caniuse-lite/data/regions/MU.js | 2 +- node_modules/caniuse-lite/data/regions/MV.js | 2 +- node_modules/caniuse-lite/data/regions/MW.js | 2 +- node_modules/caniuse-lite/data/regions/MX.js | 2 +- node_modules/caniuse-lite/data/regions/MY.js | 2 +- node_modules/caniuse-lite/data/regions/MZ.js | 2 +- node_modules/caniuse-lite/data/regions/NA.js | 2 +- node_modules/caniuse-lite/data/regions/NC.js | 2 +- node_modules/caniuse-lite/data/regions/NE.js | 2 +- node_modules/caniuse-lite/data/regions/NF.js | 2 +- node_modules/caniuse-lite/data/regions/NG.js | 2 +- node_modules/caniuse-lite/data/regions/NI.js | 2 +- node_modules/caniuse-lite/data/regions/NL.js | 2 +- node_modules/caniuse-lite/data/regions/NO.js | 2 +- node_modules/caniuse-lite/data/regions/NP.js | 2 +- node_modules/caniuse-lite/data/regions/NR.js | 2 +- node_modules/caniuse-lite/data/regions/NU.js | 2 +- node_modules/caniuse-lite/data/regions/NZ.js | 2 +- node_modules/caniuse-lite/data/regions/OM.js | 2 +- node_modules/caniuse-lite/data/regions/PA.js | 2 +- node_modules/caniuse-lite/data/regions/PE.js | 2 +- node_modules/caniuse-lite/data/regions/PF.js | 2 +- node_modules/caniuse-lite/data/regions/PG.js | 2 +- node_modules/caniuse-lite/data/regions/PH.js | 2 +- node_modules/caniuse-lite/data/regions/PK.js | 2 +- node_modules/caniuse-lite/data/regions/PL.js | 2 +- node_modules/caniuse-lite/data/regions/PM.js | 2 +- node_modules/caniuse-lite/data/regions/PN.js | 2 +- node_modules/caniuse-lite/data/regions/PR.js | 2 +- node_modules/caniuse-lite/data/regions/PS.js | 2 +- node_modules/caniuse-lite/data/regions/PT.js | 2 +- node_modules/caniuse-lite/data/regions/PW.js | 2 +- node_modules/caniuse-lite/data/regions/PY.js | 2 +- node_modules/caniuse-lite/data/regions/QA.js | 2 +- node_modules/caniuse-lite/data/regions/RE.js | 2 +- node_modules/caniuse-lite/data/regions/RO.js | 2 +- node_modules/caniuse-lite/data/regions/RS.js | 2 +- node_modules/caniuse-lite/data/regions/RU.js | 2 +- node_modules/caniuse-lite/data/regions/RW.js | 2 +- node_modules/caniuse-lite/data/regions/SA.js | 2 +- node_modules/caniuse-lite/data/regions/SB.js | 2 +- node_modules/caniuse-lite/data/regions/SC.js | 2 +- node_modules/caniuse-lite/data/regions/SD.js | 2 +- node_modules/caniuse-lite/data/regions/SE.js | 2 +- node_modules/caniuse-lite/data/regions/SG.js | 2 +- node_modules/caniuse-lite/data/regions/SH.js | 2 +- node_modules/caniuse-lite/data/regions/SI.js | 2 +- node_modules/caniuse-lite/data/regions/SK.js | 2 +- node_modules/caniuse-lite/data/regions/SL.js | 2 +- node_modules/caniuse-lite/data/regions/SM.js | 2 +- node_modules/caniuse-lite/data/regions/SN.js | 2 +- node_modules/caniuse-lite/data/regions/SO.js | 2 +- node_modules/caniuse-lite/data/regions/SR.js | 2 +- node_modules/caniuse-lite/data/regions/ST.js | 2 +- node_modules/caniuse-lite/data/regions/SV.js | 2 +- node_modules/caniuse-lite/data/regions/SY.js | 2 +- node_modules/caniuse-lite/data/regions/SZ.js | 2 +- node_modules/caniuse-lite/data/regions/TC.js | 2 +- node_modules/caniuse-lite/data/regions/TD.js | 2 +- node_modules/caniuse-lite/data/regions/TG.js | 2 +- node_modules/caniuse-lite/data/regions/TH.js | 2 +- node_modules/caniuse-lite/data/regions/TJ.js | 2 +- node_modules/caniuse-lite/data/regions/TK.js | 2 +- node_modules/caniuse-lite/data/regions/TL.js | 2 +- node_modules/caniuse-lite/data/regions/TM.js | 2 +- node_modules/caniuse-lite/data/regions/TN.js | 2 +- node_modules/caniuse-lite/data/regions/TO.js | 2 +- node_modules/caniuse-lite/data/regions/TR.js | 2 +- node_modules/caniuse-lite/data/regions/TT.js | 2 +- node_modules/caniuse-lite/data/regions/TV.js | 2 +- node_modules/caniuse-lite/data/regions/TW.js | 2 +- node_modules/caniuse-lite/data/regions/TZ.js | 2 +- node_modules/caniuse-lite/data/regions/UA.js | 2 +- node_modules/caniuse-lite/data/regions/UG.js | 2 +- node_modules/caniuse-lite/data/regions/US.js | 2 +- node_modules/caniuse-lite/data/regions/UY.js | 2 +- node_modules/caniuse-lite/data/regions/UZ.js | 2 +- node_modules/caniuse-lite/data/regions/VA.js | 2 +- node_modules/caniuse-lite/data/regions/VC.js | 2 +- node_modules/caniuse-lite/data/regions/VE.js | 2 +- node_modules/caniuse-lite/data/regions/VG.js | 2 +- node_modules/caniuse-lite/data/regions/VI.js | 2 +- node_modules/caniuse-lite/data/regions/VN.js | 2 +- node_modules/caniuse-lite/data/regions/VU.js | 2 +- node_modules/caniuse-lite/data/regions/WF.js | 2 +- node_modules/caniuse-lite/data/regions/WS.js | 2 +- node_modules/caniuse-lite/data/regions/YE.js | 2 +- node_modules/caniuse-lite/data/regions/YT.js | 2 +- node_modules/caniuse-lite/data/regions/ZA.js | 2 +- node_modules/caniuse-lite/data/regions/ZM.js | 2 +- node_modules/caniuse-lite/data/regions/ZW.js | 2 +- .../caniuse-lite/data/regions/alt-af.js | 2 +- .../caniuse-lite/data/regions/alt-an.js | 2 +- .../caniuse-lite/data/regions/alt-as.js | 2 +- .../caniuse-lite/data/regions/alt-eu.js | 2 +- .../caniuse-lite/data/regions/alt-na.js | 2 +- .../caniuse-lite/data/regions/alt-oc.js | 2 +- .../caniuse-lite/data/regions/alt-sa.js | 2 +- .../caniuse-lite/data/regions/alt-ww.js | 2 +- .../caniuse-lite/dist/lib/statuses.js | 23 +- .../caniuse-lite/dist/lib/supported.js | 23 +- .../caniuse-lite/dist/unpacker/agents.js | 84 +- .../dist/unpacker/browserVersions.js | 7 +- .../caniuse-lite/dist/unpacker/browsers.js | 7 +- .../caniuse-lite/dist/unpacker/feature.js | 92 +- .../caniuse-lite/dist/unpacker/features.js | 7 +- .../caniuse-lite/dist/unpacker/index.js | 47 +- .../caniuse-lite/dist/unpacker/region.js | 42 +- node_modules/caniuse-lite/package.json | 73 +- node_modules/capture-exit/README.md | 38 - node_modules/capture-exit/index.js | 153 - node_modules/capture-exit/package.json | 63 - node_modules/caseless/LICENSE | 28 - node_modules/caseless/README.md | 45 - node_modules/caseless/index.js | 67 - node_modules/caseless/package.json | 56 - node_modules/caseless/test.js | 67 - node_modules/ci-info/CHANGELOG.md | 155 +- node_modules/ci-info/LICENSE | 2 +- node_modules/ci-info/README.md | 87 +- node_modules/ci-info/index.d.ts | 75 + node_modules/ci-info/index.js | 88 +- node_modules/ci-info/package.json | 84 +- node_modules/ci-info/vendors.json | 193 +- node_modules/cjs-module-lexer/CHANGELOG.md | 22 + node_modules/cjs-module-lexer/README.md | 105 +- node_modules/cjs-module-lexer/dist/lexer.js | 2 +- node_modules/cjs-module-lexer/dist/lexer.mjs | 4 +- node_modules/cjs-module-lexer/lexer.d.ts | 4 +- node_modules/cjs-module-lexer/lexer.js | 421 +- node_modules/cjs-module-lexer/package.json | 71 +- node_modules/class-utils/LICENSE | 21 - node_modules/class-utils/README.md | 300 - node_modules/class-utils/index.js | 370 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 82 - node_modules/class-utils/package.json | 131 - node_modules/cliui/CHANGELOG.md | 63 + node_modules/cliui/README.md | 36 +- node_modules/cliui/build/index.cjs | 302 + node_modules/cliui/build/index.d.cts | 43 + node_modules/cliui/build/lib/index.js | 287 + node_modules/cliui/build/lib/string-utils.js | 27 + node_modules/cliui/index.js | 354 - node_modules/cliui/index.mjs | 13 + node_modules/cliui/package.json | 146 +- node_modules/co/package.json | 70 +- node_modules/collection-visit/LICENSE | 21 - node_modules/collection-visit/README.md | 89 - node_modules/collection-visit/index.js | 30 - node_modules/collection-visit/package.json | 115 - node_modules/colorette/LICENSE.md | 7 - node_modules/colorette/README.md | 102 - node_modules/colorette/index.cjs | 73 - node_modules/colorette/index.d.ts | 49 - node_modules/colorette/index.js | 73 - node_modules/colorette/package.json | 73 - node_modules/combined-stream/License | 19 - node_modules/combined-stream/Readme.md | 138 - .../combined-stream/lib/combined_stream.js | 208 - node_modules/combined-stream/package.json | 58 - node_modules/combined-stream/yarn.lock | 17 - node_modules/component-emitter/History.md | 75 - node_modules/component-emitter/LICENSE | 24 - node_modules/component-emitter/Readme.md | 74 - node_modules/component-emitter/index.js | 175 - node_modules/component-emitter/package.json | 57 - node_modules/convert-source-map/README.md | 111 +- node_modules/convert-source-map/index.js | 157 +- node_modules/convert-source-map/package.json | 76 +- node_modules/copy-descriptor/LICENSE | 21 - node_modules/copy-descriptor/index.js | 81 - node_modules/copy-descriptor/package.json | 87 - node_modules/core-util-is/LICENSE | 19 - node_modules/core-util-is/README.md | 3 - node_modules/core-util-is/float.patch | 604 - node_modules/core-util-is/lib/util.js | 107 - node_modules/core-util-is/package.json | 62 - node_modules/core-util-is/test.js | 68 - node_modules/cssom/LICENSE.txt | 20 - node_modules/cssom/README.mdown | 67 - node_modules/cssom/lib/CSSDocumentRule.js | 39 - node_modules/cssom/lib/CSSFontFaceRule.js | 36 - node_modules/cssom/lib/CSSHostRule.js | 37 - node_modules/cssom/lib/CSSImportRule.js | 132 - node_modules/cssom/lib/CSSKeyframeRule.js | 37 - node_modules/cssom/lib/CSSKeyframesRule.js | 39 - node_modules/cssom/lib/CSSMediaRule.js | 41 - node_modules/cssom/lib/CSSOM.js | 3 - node_modules/cssom/lib/CSSRule.js | 43 - node_modules/cssom/lib/CSSStyleDeclaration.js | 148 - node_modules/cssom/lib/CSSStyleRule.js | 190 - node_modules/cssom/lib/CSSStyleSheet.js | 88 - node_modules/cssom/lib/CSSSupportsRule.js | 36 - node_modules/cssom/lib/CSSValue.js | 43 - node_modules/cssom/lib/CSSValueExpression.js | 344 - node_modules/cssom/lib/MatcherList.js | 62 - node_modules/cssom/lib/MediaList.js | 61 - node_modules/cssom/lib/StyleSheet.js | 17 - node_modules/cssom/lib/clone.js | 71 - node_modules/cssom/lib/index.js | 21 - node_modules/cssom/lib/parse.js | 463 - node_modules/cssom/package.json | 53 - node_modules/cssstyle/LICENSE | 20 - node_modules/cssstyle/README.md | 15 - .../cssstyle/lib/CSSStyleDeclaration.js | 260 - .../cssstyle/lib/CSSStyleDeclaration.test.js | 556 - .../cssstyle/lib/allExtraProperties.js | 67 - node_modules/cssstyle/lib/allProperties.js | 462 - .../cssstyle/lib/allWebkitProperties.js | 194 - 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 | 722 - node_modules/cssstyle/lib/parsers.test.js | 139 - node_modules/cssstyle/lib/properties.js | 1833 -- .../cssstyle/lib/properties/azimuth.js | 67 - .../cssstyle/lib/properties/background.js | 19 - .../lib/properties/backgroundAttachment.js | 24 - .../lib/properties/backgroundColor.js | 36 - .../lib/properties/backgroundImage.js | 32 - .../lib/properties/backgroundPosition.js | 58 - .../lib/properties/backgroundRepeat.js | 32 - .../cssstyle/lib/properties/border.js | 33 - .../cssstyle/lib/properties/borderBottom.js | 17 - .../lib/properties/borderBottomColor.js | 16 - .../lib/properties/borderBottomStyle.js | 21 - .../lib/properties/borderBottomWidth.js | 16 - .../cssstyle/lib/properties/borderCollapse.js | 26 - .../cssstyle/lib/properties/borderColor.js | 30 - .../cssstyle/lib/properties/borderLeft.js | 17 - .../lib/properties/borderLeftColor.js | 16 - .../lib/properties/borderLeftStyle.js | 21 - .../lib/properties/borderLeftWidth.js | 16 - .../cssstyle/lib/properties/borderRight.js | 17 - .../lib/properties/borderRightColor.js | 16 - .../lib/properties/borderRightStyle.js | 21 - .../lib/properties/borderRightWidth.js | 16 - .../cssstyle/lib/properties/borderSpacing.js | 41 - .../cssstyle/lib/properties/borderStyle.js | 38 - .../cssstyle/lib/properties/borderTop.js | 17 - .../cssstyle/lib/properties/borderTopColor.js | 16 - .../cssstyle/lib/properties/borderTopStyle.js | 21 - .../cssstyle/lib/properties/borderTopWidth.js | 17 - .../cssstyle/lib/properties/borderWidth.js | 46 - .../cssstyle/lib/properties/bottom.js | 14 - node_modules/cssstyle/lib/properties/clear.js | 16 - node_modules/cssstyle/lib/properties/clip.js | 47 - node_modules/cssstyle/lib/properties/color.js | 14 - .../cssstyle/lib/properties/cssFloat.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 | 14 - node_modules/cssstyle/lib/properties/font.js | 43 - .../cssstyle/lib/properties/fontFamily.js | 33 - .../cssstyle/lib/properties/fontSize.js | 38 - .../cssstyle/lib/properties/fontStyle.js | 18 - .../cssstyle/lib/properties/fontVariant.js | 18 - .../cssstyle/lib/properties/fontWeight.js | 33 - .../cssstyle/lib/properties/height.js | 24 - node_modules/cssstyle/lib/properties/left.js | 14 - .../cssstyle/lib/properties/lightingColor.js | 14 - .../cssstyle/lib/properties/lineHeight.js | 26 - .../cssstyle/lib/properties/margin.js | 68 - .../cssstyle/lib/properties/marginBottom.js | 13 - .../cssstyle/lib/properties/marginLeft.js | 13 - .../cssstyle/lib/properties/marginRight.js | 13 - .../cssstyle/lib/properties/marginTop.js | 13 - .../cssstyle/lib/properties/opacity.js | 14 - .../cssstyle/lib/properties/outlineColor.js | 14 - .../cssstyle/lib/properties/padding.js | 61 - .../cssstyle/lib/properties/paddingBottom.js | 13 - .../cssstyle/lib/properties/paddingLeft.js | 13 - .../cssstyle/lib/properties/paddingRight.js | 13 - .../cssstyle/lib/properties/paddingTop.js | 13 - node_modules/cssstyle/lib/properties/right.js | 14 - .../cssstyle/lib/properties/stopColor.js | 14 - .../lib/properties/textLineThroughColor.js | 14 - .../lib/properties/textOverlineColor.js | 14 - .../lib/properties/textUnderlineColor.js | 14 - node_modules/cssstyle/lib/properties/top.js | 14 - .../lib/properties/webkitBorderAfterColor.js | 14 - .../lib/properties/webkitBorderBeforeColor.js | 14 - .../lib/properties/webkitBorderEndColor.js | 14 - .../lib/properties/webkitBorderStartColor.js | 14 - .../lib/properties/webkitColumnRuleColor.js | 14 - .../webkitMatchNearestMailBlockquoteColor.js | 14 - .../lib/properties/webkitTapHighlightColor.js | 14 - .../lib/properties/webkitTextEmphasisColor.js | 14 - .../lib/properties/webkitTextFillColor.js | 14 - .../lib/properties/webkitTextStrokeColor.js | 14 - node_modules/cssstyle/lib/properties/width.js | 24 - node_modules/cssstyle/lib/utils/colorSpace.js | 21 - .../lib/utils/getBasicPropertyDescriptor.js | 14 - .../cssstyle/node_modules/cssom/LICENSE.txt | 20 - .../cssstyle/node_modules/cssom/README.mdown | 67 - .../node_modules/cssom/lib/CSSDocumentRule.js | 39 - .../node_modules/cssom/lib/CSSFontFaceRule.js | 36 - .../node_modules/cssom/lib/CSSHostRule.js | 37 - .../node_modules/cssom/lib/CSSImportRule.js | 132 - .../node_modules/cssom/lib/CSSKeyframeRule.js | 37 - .../cssom/lib/CSSKeyframesRule.js | 39 - .../node_modules/cssom/lib/CSSMediaRule.js | 41 - .../cssstyle/node_modules/cssom/lib/CSSOM.js | 3 - .../node_modules/cssom/lib/CSSRule.js | 43 - .../cssom/lib/CSSStyleDeclaration.js | 148 - .../node_modules/cssom/lib/CSSStyleRule.js | 190 - .../node_modules/cssom/lib/CSSStyleSheet.js | 88 - .../node_modules/cssom/lib/CSSSupportsRule.js | 36 - .../node_modules/cssom/lib/CSSValue.js | 43 - .../cssom/lib/CSSValueExpression.js | 344 - .../node_modules/cssom/lib/MatcherList.js | 62 - .../node_modules/cssom/lib/MediaList.js | 61 - .../node_modules/cssom/lib/StyleSheet.js | 17 - .../cssstyle/node_modules/cssom/lib/clone.js | 82 - .../cssstyle/node_modules/cssom/lib/index.js | 21 - .../cssstyle/node_modules/cssom/lib/parse.js | 464 - .../cssstyle/node_modules/cssom/package.json | 53 - node_modules/cssstyle/package.json | 102 - node_modules/dashdash/CHANGES.md | 364 - node_modules/dashdash/LICENSE.txt | 24 - node_modules/dashdash/README.md | 574 - .../dashdash/etc/dashdash.bash_completion.in | 389 - node_modules/dashdash/lib/dashdash.js | 1055 - node_modules/dashdash/package.json | 67 - node_modules/data-urls/LICENSE.txt | 7 - node_modules/data-urls/README.md | 64 - node_modules/data-urls/lib/parser.js | 74 - node_modules/data-urls/lib/utils.js | 23 - node_modules/data-urls/package.json | 89 - node_modules/decamelize/index.js | 13 - node_modules/decamelize/license | 21 - node_modules/decamelize/package.json | 71 - node_modules/decamelize/readme.md | 48 - node_modules/decimal.js/CHANGELOG.md | 213 - node_modules/decimal.js/LICENCE.md | 23 - node_modules/decimal.js/README.md | 244 - node_modules/decimal.js/decimal.d.ts | 295 - node_modules/decimal.js/decimal.global.d.ts | 316 - node_modules/decimal.js/decimal.js | 4877 ---- node_modules/decimal.js/decimal.min.js | 2 - node_modules/decimal.js/decimal.min.js.map | 1 - node_modules/decimal.js/decimal.mjs | 4841 ---- node_modules/decimal.js/doc/API.html | 2686 -- node_modules/decimal.js/package.json | 65 - node_modules/decode-uri-component/index.js | 94 - node_modules/decode-uri-component/license | 21 - .../decode-uri-component/package.json | 69 - node_modules/decode-uri-component/readme.md | 70 - node_modules/dedent/LICENSE | 21 + node_modules/dedent/README.md | 59 + node_modules/dedent/dist/dedent.js | 59 + node_modules/dedent/package.json | 43 + node_modules/deepmerge/.editorconfig | 7 + node_modules/deepmerge/.eslintcache | 1 + node_modules/deepmerge/changelog.md | 8 + node_modules/deepmerge/dist/cjs.js | 2 +- node_modules/deepmerge/dist/umd.js | 2 +- node_modules/deepmerge/index.d.ts | 6 +- node_modules/deepmerge/index.js | 2 +- node_modules/deepmerge/package.json | 75 +- node_modules/deepmerge/readme.md | 2 +- node_modules/define-property/CHANGELOG.md | 82 - node_modules/define-property/LICENSE | 21 - node_modules/define-property/README.md | 117 - node_modules/define-property/index.js | 38 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 110 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 109 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 114 - node_modules/define-property/package.json | 108 - node_modules/delayed-stream/.npmignore | 1 - node_modules/delayed-stream/License | 19 - node_modules/delayed-stream/Makefile | 7 - node_modules/delayed-stream/Readme.md | 141 - .../delayed-stream/lib/delayed_stream.js | 107 - node_modules/delayed-stream/package.json | 62 - node_modules/diff-sequences/LICENSE | 2 +- node_modules/diff-sequences/README.md | 22 +- node_modules/diff-sequences/build/index.d.ts | 42 +- node_modules/diff-sequences/build/index.js | 268 +- node_modules/diff-sequences/package.json | 75 +- node_modules/diff-sequences/perf/example.md | 48 - node_modules/diff-sequences/perf/index.js | 170 - node_modules/domexception/LICENSE.txt | 21 - node_modules/domexception/README.md | 31 - node_modules/domexception/index.js | 7 - .../domexception/lib/DOMException-impl.js | 22 - node_modules/domexception/lib/DOMException.js | 205 - .../domexception/lib/legacy-error-codes.json | 27 - node_modules/domexception/lib/utils.js | 115 - .../webidl-conversions/LICENSE.md | 12 - .../node_modules/webidl-conversions/README.md | 79 - .../webidl-conversions/lib/index.js | 361 - .../webidl-conversions/package.json | 66 - node_modules/domexception/package.json | 78 - .../domexception/webidl2js-wrapper.js | 15 - node_modules/ecc-jsbn/LICENSE | 21 - node_modules/ecc-jsbn/README.md | 8 - node_modules/ecc-jsbn/index.js | 58 - node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 - node_modules/ecc-jsbn/lib/ec.js | 561 - node_modules/ecc-jsbn/lib/sec.js | 170 - node_modules/ecc-jsbn/package.json | 65 - node_modules/ecc-jsbn/test.js | 14 - node_modules/electron-to-chromium/README.md | 2 +- .../electron-to-chromium/chromium-versions.js | 23 +- .../chromium-versions.json | 1 + .../full-chromium-versions.js | 1334 +- .../full-chromium-versions.json | 1 + .../electron-to-chromium/full-versions.js | 994 +- .../electron-to-chromium/full-versions.json | 1 + .../electron-to-chromium/package.json | 81 +- node_modules/electron-to-chromium/versions.js | 58 +- .../electron-to-chromium/versions.json | 1 + node_modules/emittery/index.d.ts | 350 +- node_modules/emittery/index.js | 202 +- node_modules/emittery/maps.js | 9 + node_modules/emittery/package.json | 162 +- node_modules/emittery/readme.md | 209 +- node_modules/end-of-stream/LICENSE | 21 - node_modules/end-of-stream/README.md | 54 - node_modules/end-of-stream/index.js | 94 - node_modules/end-of-stream/package.json | 65 - node_modules/escodegen/LICENSE.BSD | 21 - node_modules/escodegen/README.md | 84 - node_modules/escodegen/bin/escodegen.js | 77 - node_modules/escodegen/bin/esgenerate.js | 64 - node_modules/escodegen/escodegen.js | 2647 -- .../node_modules/estraverse/.jshintrc | 16 - .../node_modules/estraverse/LICENSE.BSD | 19 - .../node_modules/estraverse/README.md | 153 - .../node_modules/estraverse/estraverse.js | 801 - .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 68 - .../escodegen/node_modules/levn/LICENSE | 22 - .../escodegen/node_modules/levn/README.md | 196 - .../escodegen/node_modules/levn/lib/cast.js | 298 - .../escodegen/node_modules/levn/lib/coerce.js | 285 - .../escodegen/node_modules/levn/lib/index.js | 22 - .../node_modules/levn/lib/parse-string.js | 113 - .../escodegen/node_modules/levn/lib/parse.js | 102 - .../escodegen/node_modules/levn/package.json | 77 - .../node_modules/optionator/CHANGELOG.md | 56 - .../escodegen/node_modules/optionator/LICENSE | 22 - .../node_modules/optionator/README.md | 238 - .../node_modules/optionator/lib/help.js | 260 - .../node_modules/optionator/lib/index.js | 465 - .../node_modules/optionator/lib/util.js | 54 - .../node_modules/optionator/package.json | 74 - .../node_modules/prelude-ls/CHANGELOG.md | 99 - .../escodegen/node_modules/prelude-ls/LICENSE | 22 - .../node_modules/prelude-ls/README.md | 15 - .../node_modules/prelude-ls/lib/Func.js | 65 - .../node_modules/prelude-ls/lib/List.js | 686 - .../node_modules/prelude-ls/lib/Num.js | 130 - .../node_modules/prelude-ls/lib/Obj.js | 154 - .../node_modules/prelude-ls/lib/Str.js | 92 - .../node_modules/prelude-ls/lib/index.js | 178 - .../node_modules/prelude-ls/package.json | 84 - .../escodegen/node_modules/type-check/LICENSE | 22 - .../node_modules/type-check/README.md | 210 - .../node_modules/type-check/lib/check.js | 126 - .../node_modules/type-check/lib/index.js | 16 - .../node_modules/type-check/lib/parse-type.js | 196 - .../node_modules/type-check/package.json | 71 - node_modules/escodegen/package.json | 95 - node_modules/exec-sh/.jshintrc | 120 - node_modules/exec-sh/.travis.yml | 38 - node_modules/exec-sh/LICENSE | 21 - node_modules/exec-sh/README.md | 127 - node_modules/exec-sh/example/example.js | 17 - node_modules/exec-sh/lib/exec-sh.js | 101 - node_modules/exec-sh/package.json | 70 - node_modules/exec-sh/test/exec-sh.js | 194 - node_modules/execa/index.d.ts | 564 + node_modules/execa/index.js | 497 +- node_modules/execa/lib/command.js | 52 + node_modules/execa/lib/errname.js | 39 - node_modules/execa/lib/error.js | 88 + .../node_modules => }/execa/lib/kill.js | 11 +- .../node_modules => }/execa/lib/promise.js | 0 node_modules/execa/lib/stdio.js | 53 +- node_modules/execa/lib/stream.js | 97 + node_modules/execa/license | 2 +- node_modules/execa/node_modules/.bin/semver | 1 - node_modules/execa/node_modules/.bin/which | 1 - .../node_modules/cross-spawn/CHANGELOG.md | 100 - .../execa/node_modules/cross-spawn/LICENSE | 21 - .../execa/node_modules/cross-spawn/README.md | 94 - .../execa/node_modules/cross-spawn/index.js | 39 - .../node_modules/cross-spawn/lib/enoent.js | 59 - .../node_modules/cross-spawn/lib/parse.js | 125 - .../cross-spawn/lib/util/escape.js | 45 - .../cross-spawn/lib/util/readShebang.js | 32 - .../cross-spawn/lib/util/resolveCommand.js | 47 - .../node_modules/cross-spawn/package.json | 107 - .../execa/node_modules/path-key/index.js | 13 - .../execa/node_modules/path-key/license | 21 - .../execa/node_modules/path-key/package.json | 71 - .../execa/node_modules/path-key/readme.md | 51 - .../execa/node_modules/semver/CHANGELOG.md | 39 - .../execa/node_modules/semver/README.md | 412 - .../execa/node_modules/semver/bin/semver | 160 - .../execa/node_modules/semver/package.json | 60 - .../execa/node_modules/semver/range.bnf | 16 - .../execa/node_modules/semver/semver.js | 1483 - .../node_modules/shebang-command/index.js | 19 - .../node_modules/shebang-command/license | 21 - .../node_modules/shebang-command/package.json | 71 - .../node_modules/shebang-command/readme.md | 39 - .../execa/node_modules/shebang-regex/index.js | 2 - .../execa/node_modules/shebang-regex/license | 21 - .../node_modules/shebang-regex/package.json | 64 - .../node_modules/shebang-regex/readme.md | 29 - .../execa/node_modules/which/CHANGELOG.md | 152 - .../execa/node_modules/which/README.md | 51 - .../execa/node_modules/which/bin/which | 52 - .../execa/node_modules/which/package.json | 65 - .../execa/node_modules/which/which.js | 135 - node_modules/execa/package.json | 174 +- node_modules/execa/readme.md | 602 +- node_modules/exit/package.json | 75 +- node_modules/expand-brackets/LICENSE | 21 - node_modules/expand-brackets/README.md | 302 - node_modules/expand-brackets/changelog.md | 35 - node_modules/expand-brackets/index.js | 211 - node_modules/expand-brackets/lib/compilers.js | 87 - node_modules/expand-brackets/lib/parsers.js | 219 - node_modules/expand-brackets/lib/utils.js | 34 - .../node_modules/debug/.coveralls.yml | 1 - .../node_modules/debug/.eslintrc | 11 - .../node_modules/debug/.npmignore | 9 - .../node_modules/debug/.travis.yml | 14 - .../node_modules/debug/CHANGELOG.md | 362 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/Makefile | 50 - .../node_modules/debug/README.md | 312 - .../node_modules/debug/component.json | 19 - .../node_modules/debug/karma.conf.js | 70 - .../node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 88 - .../node_modules/debug/src/browser.js | 185 - .../node_modules/debug/src/debug.js | 202 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/inspector-log.js | 15 - .../node_modules/debug/src/node.js | 248 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 82 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../expand-brackets/node_modules/ms/index.js | 152 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 69 - .../expand-brackets/node_modules/ms/readme.md | 51 - node_modules/expand-brackets/package.json | 133 - node_modules/expect/LICENSE | 2 +- node_modules/expect/README.md | 2 +- .../expect/build/asymmetricMatchers.d.ts | 60 - .../expect/build/asymmetricMatchers.js | 345 +- .../extractExpectedAssertionsErrors.d.ts | 10 - .../build/extractExpectedAssertionsErrors.js | 44 +- node_modules/expect/build/index.d.ts | 374 +- node_modules/expect/build/index.js | 343 +- node_modules/expect/build/jasmineUtils.d.ts | 8 - node_modules/expect/build/jasmineUtils.js | 312 - .../expect/build/jestMatchersObject.d.ts | 13 - .../expect/build/jestMatchersObject.js | 97 +- node_modules/expect/build/matchers.d.ts | 10 - node_modules/expect/build/matchers.js | 342 +- node_modules/expect/build/print.d.ts | 15 - node_modules/expect/build/print.js | 104 +- node_modules/expect/build/spyMatchers.d.ts | 9 - node_modules/expect/build/spyMatchers.js | 305 +- .../expect/build/toThrowMatchers.d.ts | 11 - node_modules/expect/build/toThrowMatchers.js | 155 +- node_modules/expect/build/types.d.ts | 328 - node_modules/expect/build/utils.d.ts | 24 - node_modules/expect/build/utils.js | 392 - .../node_modules/ansi-styles/index.d.ts | 345 - .../expect/node_modules/ansi-styles/index.js | 163 - .../node_modules/ansi-styles/package.json | 88 - .../expect/node_modules/ansi-styles/readme.md | 152 - .../node_modules/color-convert/CHANGELOG.md | 54 - .../expect/node_modules/color-convert/LICENSE | 21 - .../node_modules/color-convert/README.md | 68 - .../node_modules/color-convert/conversions.js | 839 - .../node_modules/color-convert/index.js | 81 - .../node_modules/color-convert/package.json | 83 - .../node_modules/color-convert/route.js | 97 - .../expect/node_modules/color-name/LICENSE | 8 - .../expect/node_modules/color-name/README.md | 11 - .../expect/node_modules/color-name/index.js | 152 - .../node_modules/color-name/package.json | 56 - node_modules/expect/package.json | 80 +- node_modules/extend-shallow/LICENSE | 21 - node_modules/extend-shallow/README.md | 97 - node_modules/extend-shallow/index.js | 60 - .../node_modules/is-extendable/LICENSE | 21 - .../node_modules/is-extendable/README.md | 88 - .../node_modules/is-extendable/index.d.ts | 5 - .../node_modules/is-extendable/index.js | 14 - .../node_modules/is-extendable/package.json | 98 - .../node_modules/is-plain-object/LICENSE | 21 - .../node_modules/is-plain-object/README.md | 104 - .../node_modules/is-plain-object/index.d.ts | 5 - .../node_modules/is-plain-object/index.js | 37 - .../node_modules/is-plain-object/package.json | 121 - node_modules/extend-shallow/package.json | 126 - node_modules/extend/.editorconfig | 20 - node_modules/extend/.eslintrc | 17 - node_modules/extend/.jscs.json | 175 - node_modules/extend/.travis.yml | 230 - node_modules/extend/CHANGELOG.md | 83 - node_modules/extend/LICENSE | 23 - node_modules/extend/README.md | 81 - node_modules/extend/component.json | 32 - node_modules/extend/index.js | 117 - node_modules/extend/package.json | 75 - node_modules/extglob/LICENSE | 21 - node_modules/extglob/README.md | 362 - node_modules/extglob/changelog.md | 25 - node_modules/extglob/index.js | 331 - node_modules/extglob/lib/compilers.js | 169 - node_modules/extglob/lib/extglob.js | 78 - node_modules/extglob/lib/parsers.js | 156 - node_modules/extglob/lib/utils.js | 69 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 93 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 110 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 109 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 114 - node_modules/extglob/package.json | 160 - node_modules/extsprintf/.gitmodules | 0 node_modules/extsprintf/.npmignore | 2 - node_modules/extsprintf/LICENSE | 19 - node_modules/extsprintf/Makefile | 24 - node_modules/extsprintf/Makefile.targ | 285 - node_modules/extsprintf/README.md | 46 - node_modules/extsprintf/jsl.node.conf | 137 - node_modules/extsprintf/lib/extsprintf.js | 183 - node_modules/extsprintf/package.json | 44 - node_modules/fb-watchman/index.js | 15 +- node_modules/fb-watchman/package.json | 64 +- 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/forever-agent/LICENSE | 55 - node_modules/forever-agent/README.md | 4 - node_modules/forever-agent/index.js | 138 - node_modules/forever-agent/package.json | 50 - node_modules/form-data/License | 19 - node_modules/form-data/README.md | 234 - node_modules/form-data/README.md.bak | 234 - node_modules/form-data/lib/browser.js | 2 - node_modules/form-data/lib/form_data.js | 457 - node_modules/form-data/lib/populate.js | 10 - node_modules/form-data/package.json | 98 - node_modules/form-data/yarn.lock | 2662 -- node_modules/fragment-cache/LICENSE | 21 - node_modules/fragment-cache/README.md | 156 - node_modules/fragment-cache/index.js | 128 - node_modules/fragment-cache/package.json | 93 - node_modules/get-stream/buffer-stream.js | 29 +- node_modules/get-stream/index.d.ts | 105 + node_modules/get-stream/index.js | 43 +- node_modules/get-stream/license | 2 +- node_modules/get-stream/package.json | 121 +- node_modules/get-stream/readme.md | 37 +- node_modules/get-value/LICENSE | 21 - node_modules/get-value/index.js | 50 - node_modules/get-value/package.json | 113 - node_modules/getpass/.npmignore | 8 - node_modules/getpass/.travis.yml | 9 - node_modules/getpass/LICENSE | 18 - node_modules/getpass/README.md | 32 - node_modules/getpass/lib/index.js | 123 - node_modules/getpass/package.json | 50 - node_modules/graceful-fs/LICENSE | 2 +- node_modules/graceful-fs/README.md | 12 +- node_modules/graceful-fs/graceful-fs.js | 169 +- node_modules/graceful-fs/package.json | 97 +- node_modules/graceful-fs/polyfills.js | 69 +- node_modules/growly/HISTORY.md | 5 - node_modules/growly/README.md | 95 - node_modules/growly/example/bakery.js | 22 - node_modules/growly/example/cake.png | Bin 14813 -> 0 bytes node_modules/growly/example/muffin.png | Bin 16978 -> 0 bytes node_modules/growly/example/simple.js | 3 - node_modules/growly/lib/gntp.js | 200 - node_modules/growly/lib/growly.js | 193 - node_modules/growly/package.json | 57 - node_modules/har-schema/LICENSE | 13 - node_modules/har-schema/README.md | 49 - node_modules/har-schema/lib/afterRequest.json | 30 - .../har-schema/lib/beforeRequest.json | 30 - node_modules/har-schema/lib/browser.json | 20 - node_modules/har-schema/lib/cache.json | 21 - node_modules/har-schema/lib/content.json | 29 - node_modules/har-schema/lib/cookie.json | 36 - node_modules/har-schema/lib/creator.json | 20 - node_modules/har-schema/lib/entry.json | 53 - node_modules/har-schema/lib/har.json | 13 - node_modules/har-schema/lib/header.json | 20 - node_modules/har-schema/lib/index.js | 22 - node_modules/har-schema/lib/log.json | 36 - node_modules/har-schema/lib/page.json | 32 - node_modules/har-schema/lib/pageTimings.json | 18 - node_modules/har-schema/lib/postData.json | 43 - node_modules/har-schema/lib/query.json | 20 - node_modules/har-schema/lib/request.json | 57 - node_modules/har-schema/lib/response.json | 54 - node_modules/har-schema/lib/timings.json | 42 - node_modules/har-schema/package.json | 86 - node_modules/har-validator/LICENSE | 9 - node_modules/har-validator/README.md | 43 - node_modules/har-validator/lib/async.js | 105 - node_modules/har-validator/lib/error.js | 17 - node_modules/har-validator/lib/promise.js | 102 - node_modules/har-validator/package.json | 72 - node_modules/has-value/LICENSE | 21 - node_modules/has-value/README.md | 149 - node_modules/has-value/index.js | 16 - node_modules/has-value/package.json | 120 - node_modules/has-values/LICENSE | 21 - node_modules/has-values/README.md | 129 - node_modules/has-values/index.js | 60 - .../has-values/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 - .../has-values/node_modules/kind-of/LICENSE | 21 - .../has-values/node_modules/kind-of/README.md | 267 - .../has-values/node_modules/kind-of/index.js | 119 - .../node_modules/kind-of/package.json | 139 - node_modules/has-values/package.json | 115 - node_modules/hosted-git-info/CHANGELOG.md | 141 - node_modules/hosted-git-info/LICENSE | 13 - node_modules/hosted-git-info/README.md | 133 - node_modules/hosted-git-info/git-host-info.js | 79 - node_modules/hosted-git-info/git-host.js | 156 - node_modules/hosted-git-info/index.js | 148 - node_modules/hosted-git-info/package.json | 69 - .../html-encoding-sniffer/LICENSE.txt | 7 - node_modules/html-encoding-sniffer/README.md | 38 - .../lib/html-encoding-sniffer.js | 295 - .../html-encoding-sniffer/package.json | 66 - node_modules/http-signature/.dir-locals.el | 6 - node_modules/http-signature/.npmignore | 7 - node_modules/http-signature/CHANGES.md | 46 - node_modules/http-signature/LICENSE | 18 - node_modules/http-signature/README.md | 79 - node_modules/http-signature/http_signing.md | 363 - node_modules/http-signature/lib/index.js | 29 - node_modules/http-signature/lib/parser.js | 315 - node_modules/http-signature/lib/signer.js | 401 - node_modules/http-signature/lib/utils.js | 112 - node_modules/http-signature/lib/verify.js | 88 - node_modules/http-signature/package.json | 77 - node_modules/human-signals/CHANGELOG.md | 11 + node_modules/human-signals/README.md | 22 +- .../human-signals/build/src/main.d.ts | 52 + node_modules/human-signals/package.json | 88 +- node_modules/iconv-lite/Changelog.md | 162 - node_modules/iconv-lite/LICENSE | 21 - node_modules/iconv-lite/README.md | 156 - .../iconv-lite/encodings/dbcs-codec.js | 555 - .../iconv-lite/encodings/dbcs-data.js | 176 - node_modules/iconv-lite/encodings/index.js | 22 - node_modules/iconv-lite/encodings/internal.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 174 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 55 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - node_modules/iconv-lite/encodings/utf16.js | 177 - node_modules/iconv-lite/encodings/utf7.js | 290 - node_modules/iconv-lite/lib/bom-handling.js | 52 - node_modules/iconv-lite/lib/extend-node.js | 217 - node_modules/iconv-lite/lib/index.d.ts | 24 - node_modules/iconv-lite/lib/index.js | 153 - node_modules/iconv-lite/lib/streams.js | 121 - node_modules/iconv-lite/package.json | 76 - node_modules/import-local/index.js | 13 +- node_modules/import-local/package.json | 132 +- node_modules/import-local/readme.md | 15 +- node_modules/is-accessor-descriptor/LICENSE | 21 - node_modules/is-accessor-descriptor/README.md | 123 - node_modules/is-accessor-descriptor/index.js | 69 - .../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 | 139 - .../is-accessor-descriptor/package.json | 94 - node_modules/is-arrayish/package.json | 62 +- 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 | 84 - node_modules/is-buffer/test/basic.js | 24 - node_modules/is-ci/CHANGELOG.md | 14 - node_modules/is-ci/LICENSE | 21 - node_modules/is-ci/README.md | 50 - node_modules/is-ci/bin.js | 4 - node_modules/is-ci/index.js | 3 - node_modules/is-ci/package.json | 70 - node_modules/is-core-module/.eslintignore | 1 - node_modules/is-core-module/.eslintrc | 2 +- .../is-core-module/.github/FUNDING.yml | 12 - .../.github/workflows/node-4+.yml | 54 - .../.github/workflows/node-iojs.yml | 58 - .../.github/workflows/node-pretest.yml | 26 - .../.github/workflows/node-zero.yml | 58 - .../.github/workflows/rebase.yml | 15 - .../.github/workflows/require-allow-edits.yml | 14 - node_modules/is-core-module/.nycrc | 4 - node_modules/is-core-module/CHANGELOG.md | 108 + node_modules/is-core-module/README.md | 9 +- node_modules/is-core-module/core.json | 109 +- node_modules/is-core-module/index.js | 2 +- node_modules/is-core-module/package.json | 163 +- node_modules/is-core-module/test/index.js | 52 +- node_modules/is-data-descriptor/LICENSE | 21 - node_modules/is-data-descriptor/README.md | 128 - node_modules/is-data-descriptor/index.js | 55 - .../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 | 139 - node_modules/is-data-descriptor/package.json | 93 - node_modules/is-descriptor/LICENSE | 21 - node_modules/is-descriptor/README.md | 193 - node_modules/is-descriptor/index.js | 22 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 342 - .../node_modules/kind-of/index.js | 147 - .../node_modules/kind-of/package.json | 146 - node_modules/is-descriptor/package.json | 118 - node_modules/is-docker/cli.js | 5 - node_modules/is-docker/index.d.ts | 15 - node_modules/is-docker/index.js | 29 - node_modules/is-docker/package.json | 76 - node_modules/is-docker/readme.md | 27 - 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 | 89 - .../LICENSE-MIT.txt | 20 - .../is-potential-custom-element-name/index.js | 9 - .../package.json | 63 - node_modules/is-stream/index.d.ts | 79 + node_modules/is-stream/index.js | 37 +- node_modules/is-stream/license | 22 +- node_modules/is-stream/package.json | 108 +- node_modules/is-stream/readme.md | 32 +- node_modules/is-typedarray/LICENSE.md | 18 - node_modules/is-typedarray/README.md | 16 - node_modules/is-typedarray/index.js | 41 - node_modules/is-typedarray/package.json | 61 - node_modules/is-typedarray/test.js | 34 - node_modules/is-windows/LICENSE | 21 - node_modules/is-windows/README.md | 95 - node_modules/is-windows/index.js | 27 - node_modules/is-windows/package.json | 111 - node_modules/is-wsl/index.d.ts | 15 - node_modules/is-wsl/index.js | 31 - node_modules/is-wsl/license | 9 - node_modules/is-wsl/package.json | 77 - node_modules/is-wsl/readme.md | 36 - 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 | 73 - node_modules/isarray/test.js | 20 - node_modules/isobject/LICENSE | 21 - node_modules/isobject/README.md | 122 - node_modules/isobject/index.d.ts | 5 - node_modules/isobject/index.js | 12 - node_modules/isobject/package.json | 131 - node_modules/isstream/.jshintrc | 59 - node_modules/isstream/.npmignore | 1 - node_modules/isstream/.travis.yml | 12 - node_modules/isstream/LICENSE.md | 11 - node_modules/isstream/README.md | 66 - node_modules/isstream/isstream.js | 27 - node_modules/isstream/package.json | 61 - node_modules/isstream/test.js | 168 - .../istanbul-lib-coverage/CHANGELOG.md | 28 + .../lib/coverage-summary.js | 24 +- .../lib/file-coverage.js | 131 +- .../istanbul-lib-coverage/lib/percent.js | 2 +- .../istanbul-lib-coverage/package.json | 74 +- .../istanbul-lib-instrument/CHANGELOG.md | 60 + .../istanbul-lib-instrument/README.md | 1 + .../istanbul-lib-instrument/dist/constants.js | 22 - .../istanbul-lib-instrument/dist/index.js | 42 - .../dist/instrumenter.js | 182 - .../dist/read-coverage.js | 87 - .../dist/source-coverage.js | 121 - .../istanbul-lib-instrument/dist/visitor.js | 683 - .../istanbul-lib-instrument/package.json | 83 +- .../istanbul-lib-instrument/src/constants.js | 14 + .../istanbul-lib-instrument/src/index.js | 21 + .../src/instrumenter.js | 162 + .../src/read-coverage.js | 77 + .../src/source-coverage.js | 135 + .../istanbul-lib-instrument/src/visitor.js | 843 + .../istanbul-lib-source-maps/CHANGELOG.md | 7 + .../lib/transformer.js | 24 +- .../istanbul-lib-source-maps/package.json | 71 +- node_modules/istanbul-reports/CHANGELOG.md | 64 + .../istanbul-reports/lib/cobertura/index.js | 13 +- .../lib/html-spa/assets/bundle.js | 12 +- .../lib/html-spa/assets/sort-arrow-sprite.png | Bin 209 -> 138 bytes .../lib/html-spa/assets/spa.css | 4 +- .../istanbul-reports/lib/html-spa/index.js | 1 + .../lib/html-spa/src/index.js | 6 +- .../lib/html-spa/src/summaryTableHeader.js | 6 + .../lib/html-spa/src/summaryTableLine.js | 3 +- .../istanbul-reports/lib/html/annotator.js | 44 +- .../lib/html/assets/block-navigation.js | 8 + .../lib/html/assets/favicon.png | Bin 540 -> 445 bytes .../lib/html/assets/sort-arrow-sprite.png | Bin 209 -> 138 bytes .../lib/html/assets/sorter.js | 26 + .../istanbul-reports/lib/html/index.js | 11 +- .../istanbul-reports/lib/lcovonly/index.js | 23 +- .../istanbul-reports/lib/text/index.js | 2 +- node_modules/istanbul-reports/package.json | 77 +- node_modules/jest-changed-files/LICENSE | 2 +- node_modules/jest-changed-files/README.md | 40 +- .../jest-changed-files/build/git.d.ts | 10 - node_modules/jest-changed-files/build/git.js | 95 +- node_modules/jest-changed-files/build/hg.d.ts | 10 - node_modules/jest-changed-files/build/hg.js | 69 +- .../jest-changed-files/build/index.d.ts | 38 +- .../jest-changed-files/build/index.js | 43 +- node_modules/jest-changed-files/build/sl.js | 134 + .../jest-changed-files/build/types.d.ts | 28 - .../node_modules/execa/index.d.ts | 549 - .../node_modules/execa/index.js | 260 - .../node_modules/execa/lib/command.js | 32 - .../node_modules/execa/lib/error.js | 86 - .../node_modules/execa/lib/stdio.js | 52 - .../node_modules/execa/lib/stream.js | 97 - .../node_modules/execa/license | 9 - .../node_modules/execa/package.json | 103 - .../node_modules/execa/readme.md | 656 - .../node_modules/get-stream/buffer-stream.js | 52 - .../node_modules/get-stream/index.d.ts | 108 - .../node_modules/get-stream/index.js | 60 - .../node_modules/get-stream/license | 9 - .../node_modules/get-stream/package.json | 82 - .../node_modules/get-stream/readme.md | 124 - .../node_modules/is-stream/index.d.ts | 80 - .../node_modules/is-stream/index.js | 29 - .../node_modules/is-stream/license | 9 - .../node_modules/is-stream/package.json | 73 - .../node_modules/is-stream/readme.md | 57 - .../node_modules/npm-run-path/index.js | 47 - .../node_modules/npm-run-path/license | 9 - .../node_modules/npm-run-path/package.json | 76 - .../node_modules/npm-run-path/readme.md | 115 - node_modules/jest-changed-files/package.json | 71 +- node_modules/jest-circus/LICENSE | 21 + node_modules/jest-circus/README.md | 65 + .../jest-circus/build/eventHandler.js | 271 + .../build/formatNodeAssertErrors.js | 186 + .../jest-circus/build/globalErrorHandlers.js | 44 + node_modules/jest-circus/build/index.d.ts | 72 + node_modules/jest-circus/build/index.js | 238 + .../legacy-code-todo-rewrite/jestAdapter.js | 117 + .../jestAdapterInit.js | 240 + node_modules/jest-circus/build/run.js | 331 + .../jest-circus/build/shuffleArray.js | 39 + node_modules/jest-circus/build/state.js | 80 + .../build/testCaseReportHandler.js | 27 + node_modules/jest-circus/build/types.js | 27 + node_modules/jest-circus/build/utils.js | 485 + node_modules/jest-circus/package.json | 59 + node_modules/jest-circus/runner.js | 10 + node_modules/jest-cli/LICENSE | 21 + node_modules/jest-cli/README.md | 11 + node_modules/jest-cli/bin/jest.js | 17 + node_modules/jest-cli/build/args.js | 731 + node_modules/jest-cli/build/index.d.ts | 18 + node_modules/jest-cli/build/index.js | 19 + node_modules/jest-cli/build/init/errors.js | 34 + .../jest-cli/build/init/generateConfigFile.js | 53 +- node_modules/jest-cli/build/init/index.js | 211 + .../jest-cli/build/init/modifyPackageJson.js | 8 +- .../jest-cli/build/init/questions.js | 7 +- node_modules/jest-cli/build/init/types.js | 1 + node_modules/jest-cli/build/run.js | 233 + node_modules/jest-cli/package.json | 90 + node_modules/jest-config/LICENSE | 2 +- node_modules/jest-config/build/Defaults.d.ts | 9 - node_modules/jest-config/build/Defaults.js | 56 +- .../jest-config/build/Deprecated.d.ts | 9 - node_modules/jest-config/build/Deprecated.js | 91 +- .../jest-config/build/Descriptions.d.ts | 11 - .../jest-config/build/Descriptions.js | 17 +- .../build/ReporterValidationErrors.d.ts | 19 - .../build/ReporterValidationErrors.js | 34 +- .../jest-config/build/ValidConfig.d.ts | 9 - node_modules/jest-config/build/ValidConfig.js | 220 +- node_modules/jest-config/build/color.d.ts | 10 - node_modules/jest-config/build/color.js | 10 +- node_modules/jest-config/build/constants.d.ts | 17 - node_modules/jest-config/build/constants.js | 45 +- .../jest-config/build/getCacheDirectory.d.ts | 9 - .../jest-config/build/getCacheDirectory.js | 37 +- .../jest-config/build/getMaxWorkers.d.ts | 8 - .../jest-config/build/getMaxWorkers.js | 21 +- node_modules/jest-config/build/index.d.ts | 158 +- node_modules/jest-config/build/index.js | 296 +- node_modules/jest-config/build/normalize.d.ts | 13 - node_modules/jest-config/build/normalize.js | 664 +- .../jest-config/build/parseShardPair.js | 41 + .../build/readConfigFileAndSetRootDir.d.ts | 8 - .../build/readConfigFileAndSetRootDir.js | 158 +- .../jest-config/build/resolveConfigPath.d.ts | 9 - .../jest-config/build/resolveConfigPath.js | 168 +- .../jest-config/build/setFromArgv.d.ts | 8 - node_modules/jest-config/build/setFromArgv.js | 83 +- .../jest-config/build/stringToBytes.js | 79 + node_modules/jest-config/build/utils.d.ts | 74 - node_modules/jest-config/build/utils.js | 191 +- .../jest-config/build/validatePattern.d.ts | 7 - .../jest-config/build/validatePattern.js | 5 +- .../jest-config/build/vendor/jsonlint.js | 917 - node_modules/jest-config/package.json | 124 +- node_modules/jest-diff/LICENSE | 2 +- node_modules/jest-diff/README.md | 81 +- .../jest-diff/build/cleanupSemantic.d.ts | 57 - .../jest-diff/build/cleanupSemantic.js | 192 +- node_modules/jest-diff/build/constants.d.ts | 8 - node_modules/jest-diff/build/constants.js | 4 +- node_modules/jest-diff/build/diffLines.d.ts | 11 - node_modules/jest-diff/build/diffLines.js | 116 +- node_modules/jest-diff/build/diffStrings.d.ts | 9 - node_modules/jest-diff/build/diffStrings.js | 20 +- .../jest-diff/build/getAlignedDiffs.d.ts | 10 - .../jest-diff/build/getAlignedDiffs.js | 89 +- node_modules/jest-diff/build/index.d.ts | 99 +- node_modules/jest-diff/build/index.js | 142 +- .../jest-diff/build/joinAlignedDiffs.d.ts | 10 - .../jest-diff/build/joinAlignedDiffs.js | 164 +- .../jest-diff/build/normalizeDiffOptions.d.ts | 9 - .../jest-diff/build/normalizeDiffOptions.js | 18 +- node_modules/jest-diff/build/printDiffs.d.ts | 22 - node_modules/jest-diff/build/printDiffs.js | 204 +- node_modules/jest-diff/build/types.d.ts | 45 - node_modules/jest-diff/package.json | 66 +- node_modules/jest-docblock/LICENSE | 2 +- node_modules/jest-docblock/build/index.d.ts | 26 +- node_modules/jest-docblock/build/index.js | 43 +- node_modules/jest-docblock/package.json | 57 +- node_modules/jest-each/LICENSE | 2 +- node_modules/jest-each/README.md | 44 +- node_modules/jest-each/build/bind.d.ts | 15 - node_modules/jest-each/build/bind.js | 79 +- node_modules/jest-each/build/index.d.ts | 192 +- node_modules/jest-each/build/index.js | 25 +- node_modules/jest-each/build/table/array.d.ts | 11 - node_modules/jest-each/build/table/array.js | 87 +- .../jest-each/build/table/interpolation.js | 53 + .../jest-each/build/table/template.d.ts | 19 - .../jest-each/build/table/template.js | 76 +- node_modules/jest-each/build/validation.d.ts | 10 - node_modules/jest-each/build/validation.js | 75 +- node_modules/jest-each/package.json | 79 +- node_modules/jest-environment-jsdom/LICENSE | 21 - .../jest-environment-jsdom/build/index.d.ts | 34 - .../jest-environment-jsdom/build/index.js | 186 - .../jest-environment-jsdom/package.json | 61 - node_modules/jest-environment-node/LICENSE | 2 +- .../jest-environment-node/build/index.d.ts | 55 +- .../jest-environment-node/build/index.js | 233 +- .../jest-environment-node/package.json | 68 +- node_modules/jest-get-type/LICENSE | 2 +- node_modules/jest-get-type/build/index.d.ts | 29 +- node_modules/jest-get-type/build/index.js | 16 +- node_modules/jest-get-type/package.json | 65 +- node_modules/jest-haste-map/LICENSE | 2 +- .../jest-haste-map/build/HasteFS.d.ts | 27 - node_modules/jest-haste-map/build/HasteFS.js | 76 +- .../jest-haste-map/build/ModuleMap.d.ts | 48 - .../jest-haste-map/build/ModuleMap.js | 122 +- .../jest-haste-map/build/blacklist.d.ts | 8 - .../jest-haste-map/build/blacklist.js | 17 +- .../jest-haste-map/build/constants.d.ts | 9 - .../jest-haste-map/build/constants.js | 8 +- .../jest-haste-map/build/crawlers/node.d.ts | 12 - .../jest-haste-map/build/crawlers/node.js | 153 +- .../build/crawlers/watchman.d.ts | 13 - .../jest-haste-map/build/crawlers/watchman.js | 250 +- .../jest-haste-map/build/getMockName.d.ts | 8 - .../jest-haste-map/build/getMockName.js | 31 +- node_modules/jest-haste-map/build/index.d.ts | 409 +- node_modules/jest-haste-map/build/index.js | 609 +- .../build/lib/FSEventsWatcher.d.ts | 44 - .../build/lib/dependencyExtractor.d.ts | 7 - .../build/lib/dependencyExtractor.js | 55 +- .../jest-haste-map/build/lib/fast_path.d.ts | 8 - .../jest-haste-map/build/lib/fast_path.js | 35 +- .../build/lib/getPlatformExtension.d.ts | 7 - .../build/lib/getPlatformExtension.js | 13 +- .../build/lib/isRegExpSupported.d.ts | 7 - .../build/lib/isRegExpSupported.js | 22 - .../build/lib/isWatchmanInstalled.js | 37 + .../build/lib/normalizePathSep.d.ts | 8 - .../build/lib/normalizePathSep.js | 31 +- node_modules/jest-haste-map/build/types.d.ts | 102 - .../{lib => watchers}/FSEventsWatcher.js | 131 +- .../build/watchers/NodeWatcher.js | 369 + .../build/watchers/RecrawlWarning.js | 49 + .../{lib => watchers}/WatchmanWatcher.js | 165 +- .../build/watchers}/common.js | 21 +- node_modules/jest-haste-map/build/worker.d.ts | 9 - node_modules/jest-haste-map/build/worker.js | 91 +- node_modules/jest-haste-map/package.json | 93 +- node_modules/jest-jasmine2/LICENSE | 21 - .../build/ExpectationFailed.d.ts | 8 - .../jest-jasmine2/build/ExpectationFailed.js | 16 - .../jest-jasmine2/build/PCancelable.d.ts | 17 - .../jest-jasmine2/build/PCancelable.js | 97 - .../build/assertionErrorMessage.d.ts | 10 - .../build/assertionErrorMessage.js | 156 - node_modules/jest-jasmine2/build/each.d.ts | 9 - node_modules/jest-jasmine2/build/each.js | 46 - .../jest-jasmine2/build/errorOnPrivate.d.ts | 8 - .../jest-jasmine2/build/errorOnPrivate.js | 66 - .../build/expectationResultFactory.d.ts | 16 - .../build/expectationResultFactory.js | 97 - node_modules/jest-jasmine2/build/index.d.ts | 16 - node_modules/jest-jasmine2/build/index.js | 265 - node_modules/jest-jasmine2/build/isError.d.ts | 10 - node_modules/jest-jasmine2/build/isError.js | 36 - .../build/jasmine/CallTracker.d.ts | 25 - .../build/jasmine/CallTracker.js | 121 - .../jest-jasmine2/build/jasmine/Env.d.ts | 43 - .../jest-jasmine2/build/jasmine/Env.js | 745 - .../build/jasmine/JsApiReporter.d.ts | 31 - .../build/jasmine/JsApiReporter.js | 173 - .../build/jasmine/ReportDispatcher.d.ts | 22 - .../build/jasmine/ReportDispatcher.js | 127 - .../jest-jasmine2/build/jasmine/Spec.d.ts | 81 - .../jest-jasmine2/build/jasmine/Spec.js | 298 - .../build/jasmine/SpyStrategy.d.ts | 22 - .../build/jasmine/SpyStrategy.js | 143 - .../jest-jasmine2/build/jasmine/Suite.d.ts | 61 - .../jest-jasmine2/build/jasmine/Suite.js | 235 - .../jest-jasmine2/build/jasmine/Timer.d.ts | 14 - .../jest-jasmine2/build/jasmine/Timer.js | 79 - .../build/jasmine/createSpy.d.ts | 13 - .../jest-jasmine2/build/jasmine/createSpy.js | 88 - .../build/jasmine/jasmineLight.d.ts | 27 - .../build/jasmine/jasmineLight.js | 171 - .../build/jasmine/spyRegistry.d.ts | 18 - .../build/jasmine/spyRegistry.js | 222 - .../build/jasmineAsyncInstall.d.ts | 8 - .../build/jasmineAsyncInstall.js | 190 - .../jest-jasmine2/build/jestExpect.d.ts | 10 - .../jest-jasmine2/build/jestExpect.js | 71 - .../jest-jasmine2/build/pTimeout.d.ts | 7 - node_modules/jest-jasmine2/build/pTimeout.js | 33 - .../jest-jasmine2/build/queueRunner.d.ts | 30 - .../jest-jasmine2/build/queueRunner.js | 83 - .../jest-jasmine2/build/reporter.d.ts | 31 - node_modules/jest-jasmine2/build/reporter.js | 177 - .../build/setup_jest_globals.d.ts | 17 - .../jest-jasmine2/build/setup_jest_globals.js | 115 - .../jest-jasmine2/build/treeProcessor.d.ts | 26 - .../jest-jasmine2/build/treeProcessor.js | 79 - node_modules/jest-jasmine2/build/types.d.ts | 82 - node_modules/jest-jasmine2/build/types.js | 7 - node_modules/jest-jasmine2/package.json | 72 - node_modules/jest-leak-detector/LICENSE | 2 +- .../jest-leak-detector/build/index.d.ts | 19 +- .../jest-leak-detector/build/index.js | 98 +- node_modules/jest-leak-detector/package.json | 64 +- node_modules/jest-matcher-utils/LICENSE | 2 +- node_modules/jest-matcher-utils/README.md | 24 + .../jest-matcher-utils/build/Replaceable.d.ts | 17 - .../jest-matcher-utils/build/Replaceable.js | 50 +- .../build/deepCyclicCopyReplaceable.d.ts | 7 - .../build/deepCyclicCopyReplaceable.js | 21 +- .../jest-matcher-utils/build/index.d.ts | 151 +- .../jest-matcher-utils/build/index.js | 294 +- node_modules/jest-matcher-utils/package.json | 72 +- node_modules/jest-message-util/LICENSE | 2 +- .../jest-message-util/build/index.d.ts | 75 +- node_modules/jest-message-util/build/index.js | 342 +- .../jest-message-util/build/types.d.ts | 10 - .../node_modules/@babel/code-frame/LICENSE | 22 + .../node_modules/@babel/code-frame/README.md | 19 + .../@babel/code-frame/lib/index.js | 142 + .../@babel/code-frame/lib/index.js.map | 1 + .../@babel/code-frame/package.json | 28 + node_modules/jest-message-util/package.json | 82 +- node_modules/jest-mock/LICENSE | 2 +- node_modules/jest-mock/README.md | 32 +- node_modules/jest-mock/build/index.d.ts | 535 +- node_modules/jest-mock/build/index.js | 709 +- node_modules/jest-mock/package.json | 70 +- node_modules/jest-pnp-resolver/index.js | 9 +- node_modules/jest-pnp-resolver/package.json | 79 +- node_modules/jest-regex-util/LICENSE | 2 +- node_modules/jest-regex-util/build/index.d.ts | 12 +- node_modules/jest-regex-util/build/index.js | 19 +- node_modules/jest-regex-util/package.json | 62 +- .../jest-resolve-dependencies/LICENSE | 2 +- .../build/index.d.ts | 53 +- .../jest-resolve-dependencies/build/index.js | 96 +- .../jest-resolve-dependencies/package.json | 70 +- node_modules/jest-resolve/LICENSE | 2 +- .../build/ModuleNotFoundError.d.ts | 18 - .../jest-resolve/build/ModuleNotFoundError.js | 85 +- .../jest-resolve/build/defaultResolver.d.ts | 29 - .../jest-resolve/build/defaultResolver.js | 277 +- .../jest-resolve/build/fileWalkers.js | 178 + node_modules/jest-resolve/build/index.d.ts | 362 +- node_modules/jest-resolve/build/index.js | 590 +- .../jest-resolve/build/isBuiltinModule.d.ts | 7 - .../jest-resolve/build/isBuiltinModule.js | 16 +- .../jest-resolve/build/nodeModulesPaths.d.ts | 15 - .../jest-resolve/build/nodeModulesPaths.js | 61 +- node_modules/jest-resolve/build/resolver.js | 796 + .../jest-resolve/build/shouldLoadAsEsm.d.ts | 9 - .../jest-resolve/build/shouldLoadAsEsm.js | 83 +- node_modules/jest-resolve/build/types.d.ts | 23 - node_modules/jest-resolve/build/utils.js | 233 + node_modules/jest-resolve/package.json | 78 +- node_modules/jest-runner/LICENSE | 2 +- node_modules/jest-runner/build/index.d.ts | 148 +- node_modules/jest-runner/build/index.js | 276 +- node_modules/jest-runner/build/runTest.d.ts | 12 - node_modules/jest-runner/build/runTest.js | 277 +- .../jest-runner/build/testWorker.d.ts | 26 - node_modules/jest-runner/build/testWorker.js | 45 +- node_modules/jest-runner/build/types.d.ts | 59 - node_modules/jest-runner/build/types.js | 27 + node_modules/jest-runner/package.json | 101 +- node_modules/jest-runtime/LICENSE | 2 +- node_modules/jest-runtime/bin/jest-runtime.js | 13 - node_modules/jest-runtime/build/cli/args.d.ts | 9 - node_modules/jest-runtime/build/cli/args.js | 46 - .../jest-runtime/build/cli/index.d.ts | 8 - node_modules/jest-runtime/build/cli/index.js | 265 - node_modules/jest-runtime/build/helpers.d.ts | 10 - node_modules/jest-runtime/build/helpers.js | 64 +- node_modules/jest-runtime/build/index.d.ts | 303 +- node_modules/jest-runtime/build/index.js | 1906 +- node_modules/jest-runtime/build/types.d.ts | 15 - node_modules/jest-runtime/build/version.d.ts | 7 - node_modules/jest-runtime/build/version.js | 17 - node_modules/jest-runtime/package.json | 113 +- node_modules/jest-serializer/LICENSE | 21 - node_modules/jest-serializer/README.md | 47 - node_modules/jest-serializer/build/index.d.ts | 20 - node_modules/jest-serializer/build/index.js | 109 - node_modules/jest-serializer/package.json | 56 - node_modules/jest-serializer/v8.d.ts | 11 - node_modules/jest-snapshot/LICENSE | 2 +- .../jest-snapshot/build/InlineSnapshots.d.ts | 13 - .../jest-snapshot/build/InlineSnapshots.js | 466 +- .../jest-snapshot/build/SnapshotResolver.d.ts | 16 - .../jest-snapshot/build/SnapshotResolver.js | 88 +- node_modules/jest-snapshot/build/State.d.ts | 62 - node_modules/jest-snapshot/build/State.js | 155 +- node_modules/jest-snapshot/build/colors.d.ts | 15 - node_modules/jest-snapshot/build/colors.js | 15 +- .../jest-snapshot/build/dedentLines.d.ts | 7 - .../jest-snapshot/build/dedentLines.js | 43 +- node_modules/jest-snapshot/build/index.d.ts | 206 +- node_modules/jest-snapshot/build/index.js | 326 +- .../jest-snapshot/build/mockSerializer.d.ts | 11 - .../jest-snapshot/build/mockSerializer.js | 45 +- node_modules/jest-snapshot/build/plugins.d.ts | 9 - node_modules/jest-snapshot/build/plugins.js | 17 +- .../jest-snapshot/build/printSnapshot.d.ts | 24 - .../jest-snapshot/build/printSnapshot.js | 178 +- node_modules/jest-snapshot/build/types.d.ts | 27 - node_modules/jest-snapshot/build/utils.d.ts | 27 - node_modules/jest-snapshot/build/utils.js | 190 +- node_modules/jest-snapshot/package.json | 108 +- node_modules/jest-util/LICENSE | 2 +- .../jest-util/build/ErrorWithStack.d.ts | 9 - .../jest-util/build/ErrorWithStack.js | 14 +- node_modules/jest-util/build/clearLine.d.ts | 8 - node_modules/jest-util/build/clearLine.js | 4 +- .../build/convertDescriptorToString.d.ts | 7 - .../build/convertDescriptorToString.js | 41 +- .../jest-util/build/createDirectory.d.ts | 8 - .../jest-util/build/createDirectory.js | 29 +- .../jest-util/build/createProcessObject.d.ts | 8 - .../jest-util/build/createProcessObject.js | 61 +- .../jest-util/build/deepCyclicCopy.d.ts | 11 - .../jest-util/build/deepCyclicCopy.js | 14 +- node_modules/jest-util/build/formatTime.d.ts | 7 - node_modules/jest-util/build/formatTime.js | 4 +- .../jest-util/build/globsToMatcher.d.ts | 27 - .../jest-util/build/globsToMatcher.js | 47 +- node_modules/jest-util/build/index.d.ts | 139 +- node_modules/jest-util/build/index.js | 125 +- .../jest-util/build/installCommonGlobals.d.ts | 9 - .../jest-util/build/installCommonGlobals.js | 52 +- .../build/interopRequireDefault.d.ts | 7 - .../jest-util/build/interopRequireDefault.js | 4 +- .../jest-util/build/isInteractive.d.ts | 8 - node_modules/jest-util/build/isInteractive.js | 19 +- node_modules/jest-util/build/isPromise.d.ts | 8 - node_modules/jest-util/build/isPromise.js | 18 +- node_modules/jest-util/build/pluralize.d.ts | 7 - node_modules/jest-util/build/pluralize.js | 4 +- .../jest-util/build/preRunMessage.d.ts | 9 - node_modules/jest-util/build/preRunMessage.js | 26 +- .../build/replacePathSepForGlob.d.ts | 8 - .../jest-util/build/replacePathSepForGlob.js | 4 +- .../jest-util/build/requireOrImportModule.js | 77 + node_modules/jest-util/build/setGlobal.d.ts | 9 - node_modules/jest-util/build/setGlobal.js | 12 +- .../jest-util/build/specialChars.d.ts | 14 - node_modules/jest-util/build/specialChars.js | 6 +- .../build/testPathPatternToRegExp.d.ts | 9 - .../build/testPathPatternToRegExp.js | 12 +- node_modules/jest-util/build/tryRealpath.d.ts | 8 - node_modules/jest-util/build/tryRealpath.js | 10 +- node_modules/jest-util/package.json | 84 +- node_modules/jest-validate/LICENSE | 2 +- .../jest-validate/build/condition.d.ts | 9 - node_modules/jest-validate/build/condition.js | 18 +- .../jest-validate/build/defaultConfig.d.ts | 9 - .../jest-validate/build/defaultConfig.js | 9 +- .../jest-validate/build/deprecated.d.ts | 8 - .../jest-validate/build/deprecated.js | 8 +- node_modules/jest-validate/build/errors.d.ts | 8 - node_modules/jest-validate/build/errors.js | 23 +- .../jest-validate/build/exampleConfig.d.ts | 9 - .../jest-validate/build/exampleConfig.js | 6 +- node_modules/jest-validate/build/index.d.ts | 90 +- node_modules/jest-validate/build/index.js | 17 +- node_modules/jest-validate/build/types.d.ts | 27 - node_modules/jest-validate/build/utils.d.ts | 18 - node_modules/jest-validate/build/utils.js | 73 +- .../jest-validate/build/validate.d.ts | 13 - node_modules/jest-validate/build/validate.js | 40 +- .../build/validateCLIOptions.d.ts | 14 - .../jest-validate/build/validateCLIOptions.js | 51 +- .../jest-validate/build/warnings.d.ts | 8 - node_modules/jest-validate/build/warnings.js | 25 +- .../node_modules/camelcase/index.d.ts | 8 +- .../node_modules/camelcase/index.js | 58 +- .../node_modules/camelcase/package.json | 116 +- .../node_modules/camelcase/readme.md | 26 +- node_modules/jest-validate/package.json | 70 +- node_modules/jest-watcher/LICENSE | 2 +- .../jest-watcher/build/BaseWatchPlugin.d.ts | 22 - .../jest-watcher/build/BaseWatchPlugin.js | 29 +- .../jest-watcher/build/JestHooks.d.ts | 18 - node_modules/jest-watcher/build/JestHooks.js | 40 +- .../jest-watcher/build/PatternPrompt.d.ts | 20 - .../jest-watcher/build/PatternPrompt.js | 65 +- .../jest-watcher/build/TestWatcher.js | 45 + .../jest-watcher/build/constants.d.ts | 17 - node_modules/jest-watcher/build/constants.js | 5 +- node_modules/jest-watcher/build/index.d.ts | 225 +- node_modules/jest-watcher/build/index.js | 17 +- .../jest-watcher/build/lib/Prompt.d.ts | 25 - node_modules/jest-watcher/build/lib/Prompt.js | 112 +- .../jest-watcher/build/lib/colorize.d.ts | 8 - .../jest-watcher/build/lib/colorize.js | 21 +- .../build/lib/formatTestNameByPattern.d.ts | 8 - .../build/lib/formatTestNameByPattern.js | 28 +- .../build/lib/patternModeHelpers.d.ts | 9 - .../build/lib/patternModeHelpers.js | 30 +- .../jest-watcher/build/lib/scroll.d.ts | 12 - node_modules/jest-watcher/build/lib/scroll.js | 7 +- node_modules/jest-watcher/build/types.d.ts | 59 - node_modules/jest-watcher/package.json | 67 +- node_modules/jest-worker/LICENSE | 2 +- node_modules/jest-worker/README.md | 117 +- node_modules/jest-worker/build/Farm.d.ts | 26 - node_modules/jest-worker/build/Farm.js | 221 +- node_modules/jest-worker/build/FifoQueue.js | 89 + .../jest-worker/build/PriorityQueue.js | 137 + .../jest-worker/build/WorkerPool.d.ts | 13 - node_modules/jest-worker/build/WorkerPool.js | 20 +- .../build/base/BaseWorkerPool.d.ts | 21 - .../jest-worker/build/base/BaseWorkerPool.js | 154 +- node_modules/jest-worker/build/index.d.ts | 340 +- node_modules/jest-worker/build/index.js | 169 +- node_modules/jest-worker/build/types.d.ts | 128 - node_modules/jest-worker/build/types.js | 42 +- .../build/workers/ChildProcessWorker.d.ts | 51 - .../build/workers/ChildProcessWorker.js | 484 +- .../build/workers/NodeThreadsWorker.d.ts | 34 - .../build/workers/NodeThreadsWorker.js | 421 +- .../build/workers/WorkerAbstract.js | 135 + .../build/workers/messageParent.d.ts | 9 - .../build/workers/messageParent.js | 50 +- .../build/workers/processChild.d.ts | 7 - .../jest-worker/build/workers/processChild.js | 99 +- .../build/workers/threadChild.d.ts | 7 - .../jest-worker/build/workers/threadChild.js | 106 +- .../node_modules/supports-color/browser.js | 23 +- .../node_modules/supports-color/index.js | 65 +- .../node_modules/supports-color/license | 2 +- .../node_modules/supports-color/package.json | 139 +- .../node_modules/supports-color/readme.md | 15 +- node_modules/jest-worker/package.json | 68 +- node_modules/jest/LICENSE | 2 +- node_modules/jest/README.md | 2 +- node_modules/jest/bin/jest.js | 2 +- node_modules/jest/build/index.d.ts | 26 + node_modules/jest/build/index.js | 49 + node_modules/jest/build/jest.d.ts | 8 - node_modules/jest/build/jest.js | 61 - node_modules/jest/node_modules/.bin/jest | 1 - .../jest/node_modules/jest-cli/LICENSE | 21 - .../jest/node_modules/jest-cli/README.md | 11 - .../jest/node_modules/jest-cli/bin/jest.js | 17 - .../node_modules/jest-cli/build/cli/args.d.ts | 506 - .../node_modules/jest-cli/build/cli/args.js | 786 - .../jest-cli/build/cli/index.d.ts | 9 - .../node_modules/jest-cli/build/cli/index.js | 273 - .../node_modules/jest-cli/build/index.d.ts | 7 - .../jest/node_modules/jest-cli/build/index.js | 13 - .../jest-cli/build/init/errors.d.ts | 12 - .../jest-cli/build/init/errors.js | 35 - .../build/init/generateConfigFile.d.ts | 8 - .../jest-cli/build/init/index.d.ts | 8 - .../node_modules/jest-cli/build/init/index.js | 250 - .../build/init/modifyPackageJson.d.ts | 12 - .../jest-cli/build/init/questions.d.ts | 10 - .../jest-cli/build/init/types.d.ts | 12 - .../jest/node_modules/jest-cli/package.json | 101 - node_modules/jest/package.json | 92 +- node_modules/jsbn/.npmignore | 2 - node_modules/jsbn/LICENSE | 40 - node_modules/jsbn/README.md | 175 - node_modules/jsbn/example.html | 12 - node_modules/jsbn/example.js | 3 - node_modules/jsbn/index.js | 1357 - node_modules/jsbn/package.json | 53 - node_modules/jsdom/Changelog.md | 1869 -- node_modules/jsdom/LICENSE.txt | 22 - node_modules/jsdom/README.md | 522 - node_modules/jsdom/lib/api.js | 333 - .../jsdom/lib/jsdom/browser/Window.js | 933 - .../lib/jsdom/browser/default-stylesheet.js | 789 - .../jsdom/lib/jsdom/browser/js-globals.json | 307 - .../lib/jsdom/browser/not-implemented.js | 13 - .../jsdom/lib/jsdom/browser/parser/html.js | 223 - .../jsdom/lib/jsdom/browser/parser/index.js | 37 - .../jsdom/lib/jsdom/browser/parser/xml.js | 202 - .../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 | 123 - .../jsdom/browser/resources/resource-queue.js | 142 - node_modules/jsdom/lib/jsdom/level2/style.js | 57 - node_modules/jsdom/lib/jsdom/level3/xpath.js | 1874 -- .../living/aborting/AbortController-impl.js | 17 - .../jsdom/living/aborting/AbortSignal-impl.js | 48 - .../jsdom/lib/jsdom/living/attributes.js | 312 - .../lib/jsdom/living/attributes/Attr-impl.js | 60 - .../living/attributes/NamedNodeMap-impl.js | 78 - .../DefaultConstraintValidation-impl.js | 75 - .../ValidityState-impl.js | 66 - .../jsdom/living/cssom/StyleSheetList-impl.js | 38 - .../CustomElementRegistry-impl.js | 265 - .../jsdom/lib/jsdom/living/documents.js | 15 - .../jsdom/living/domparsing/DOMParser-impl.js | 58 - .../living/domparsing/XMLSerializer-impl.js | 18 - .../parse5-adapter-serialization.js | 63 - .../jsdom/living/domparsing/serialization.js | 45 - .../jsdom/living/events/CloseEvent-impl.js | 10 - .../living/events/CompositionEvent-impl.js | 20 - .../jsdom/living/events/CustomEvent-impl.js | 21 - .../jsdom/living/events/ErrorEvent-impl.js | 14 - .../lib/jsdom/living/events/Event-impl.js | 197 - .../living/events/EventModifierMixin-impl.js | 18 - .../jsdom/living/events/EventTarget-impl.js | 403 - .../jsdom/living/events/FocusEvent-impl.js | 9 - .../living/events/HashChangeEvent-impl.js | 14 - .../jsdom/living/events/InputEvent-impl.js | 11 - .../jsdom/living/events/KeyboardEvent-impl.js | 29 - .../jsdom/living/events/MessageEvent-impl.js | 25 - .../jsdom/living/events/MouseEvent-impl.js | 49 - .../living/events/PageTransitionEvent-impl.js | 20 - .../jsdom/living/events/PopStateEvent-impl.js | 9 - .../jsdom/living/events/ProgressEvent-impl.js | 14 - .../jsdom/living/events/StorageEvent-impl.js | 26 - .../jsdom/living/events/TouchEvent-impl.js | 14 - .../lib/jsdom/living/events/UIEvent-impl.js | 59 - .../jsdom/living/events/WheelEvent-impl.js | 12 - .../lib/jsdom/living/fetch/Headers-impl.js | 165 - .../lib/jsdom/living/fetch/header-list.js | 54 - .../lib/jsdom/living/fetch/header-types.js | 103 - .../lib/jsdom/living/file-api/Blob-impl.js | 93 - .../lib/jsdom/living/file-api/File-impl.js | 12 - .../jsdom/living/file-api/FileList-impl.js | 15 - .../jsdom/living/file-api/FileReader-impl.js | 130 - .../jsdom/living/generated/AbortController.js | 130 - .../lib/jsdom/living/generated/AbortSignal.js | 154 - .../jsdom/living/generated/AbstractRange.js | 162 - .../generated/AddEventListenerOptions.js | 44 - .../living/generated/AssignedNodesOptions.js | 28 - .../jsdom/lib/jsdom/living/generated/Attr.js | 215 - .../lib/jsdom/living/generated/BarProp.js | 118 - .../lib/jsdom/living/generated/BinaryType.js | 12 - .../jsdom/lib/jsdom/living/generated/Blob.js | 198 - .../jsdom/living/generated/BlobCallback.js | 34 - .../jsdom/living/generated/BlobPropertyBag.js | 42 - .../jsdom/living/generated/CDATASection.js | 114 - .../living/generated/CanPlayTypeResult.js | 12 - .../jsdom/living/generated/CharacterData.js | 436 - .../lib/jsdom/living/generated/CloseEvent.js | 164 - .../jsdom/living/generated/CloseEventInit.js | 56 - .../lib/jsdom/living/generated/Comment.js | 122 - .../living/generated/CompositionEvent.js | 217 - .../living/generated/CompositionEventInit.js | 32 - .../generated/CustomElementConstructor.js | 38 - .../living/generated/CustomElementRegistry.js | 242 - .../lib/jsdom/living/generated/CustomEvent.js | 200 - .../jsdom/living/generated/CustomEventInit.js | 32 - .../living/generated/DOMImplementation.js | 232 - .../lib/jsdom/living/generated/DOMParser.js | 140 - .../jsdom/living/generated/DOMStringMap.js | 322 - .../jsdom/living/generated/DOMTokenList.js | 531 - .../lib/jsdom/living/generated/Document.js | 3293 --- .../living/generated/DocumentFragment.js | 296 - .../living/generated/DocumentReadyState.js | 12 - .../jsdom/living/generated/DocumentType.js | 246 - .../lib/jsdom/living/generated/Element.js | 1582 -- .../generated/ElementCreationOptions.js | 26 - .../generated/ElementDefinitionOptions.js | 26 - .../lib/jsdom/living/generated/EndingType.js | 12 - .../lib/jsdom/living/generated/ErrorEvent.js | 186 - .../jsdom/living/generated/ErrorEventInit.js | 80 - .../jsdom/lib/jsdom/living/generated/Event.js | 390 - .../living/generated/EventHandlerNonNull.js | 40 - .../lib/jsdom/living/generated/EventInit.js | 52 - .../jsdom/living/generated/EventListener.js | 35 - .../living/generated/EventListenerOptions.js | 28 - .../living/generated/EventModifierInit.js | 188 - .../lib/jsdom/living/generated/EventTarget.js | 252 - .../lib/jsdom/living/generated/External.js | 129 - .../jsdom/lib/jsdom/living/generated/File.js | 176 - .../lib/jsdom/living/generated/FileList.js | 305 - .../jsdom/living/generated/FilePropertyBag.js | 30 - .../lib/jsdom/living/generated/FileReader.js | 440 - .../lib/jsdom/living/generated/FocusEvent.js | 142 - .../jsdom/living/generated/FocusEventInit.js | 36 - .../lib/jsdom/living/generated/FormData.js | 421 - .../lib/jsdom/living/generated/Function.js | 46 - .../living/generated/GetRootNodeOptions.js | 28 - .../living/generated/HTMLAnchorElement.js | 915 - .../jsdom/living/generated/HTMLAreaElement.js | 739 - .../living/generated/HTMLAudioElement.js | 115 - .../jsdom/living/generated/HTMLBRElement.js | 153 - .../jsdom/living/generated/HTMLBaseElement.js | 188 - .../jsdom/living/generated/HTMLBodyElement.js | 808 - .../living/generated/HTMLButtonElement.js | 487 - .../living/generated/HTMLCanvasElement.js | 291 - .../jsdom/living/generated/HTMLCollection.js | 358 - .../living/generated/HTMLDListElement.js | 156 - .../jsdom/living/generated/HTMLDataElement.js | 153 - .../living/generated/HTMLDataListElement.js | 128 - .../living/generated/HTMLDetailsElement.js | 156 - .../living/generated/HTMLDialogElement.js | 156 - .../living/generated/HTMLDirectoryElement.js | 156 - .../jsdom/living/generated/HTMLDivElement.js | 153 - .../lib/jsdom/living/generated/HTMLElement.js | 2269 -- .../living/generated/HTMLEmbedElement.js | 346 - .../living/generated/HTMLFieldSetElement.js | 315 - .../jsdom/living/generated/HTMLFontElement.js | 226 - .../jsdom/living/generated/HTMLFormElement.js | 457 - .../living/generated/HTMLFrameElement.js | 459 - .../living/generated/HTMLFrameSetElement.js | 683 - .../jsdom/living/generated/HTMLHRElement.js | 300 - .../jsdom/living/generated/HTMLHeadElement.js | 115 - .../living/generated/HTMLHeadingElement.js | 153 - .../jsdom/living/generated/HTMLHtmlElement.js | 153 - .../living/generated/HTMLIFrameElement.js | 621 - .../living/generated/HTMLImageElement.js | 789 - .../living/generated/HTMLInputElement.js | 1696 -- .../jsdom/living/generated/HTMLLIElement.js | 194 - .../living/generated/HTMLLabelElement.js | 175 - .../living/generated/HTMLLegendElement.js | 164 - .../jsdom/living/generated/HTMLLinkElement.js | 496 - .../jsdom/living/generated/HTMLMapElement.js | 166 - .../living/generated/HTMLMarqueeElement.js | 509 - .../living/generated/HTMLMediaElement.js | 802 - .../jsdom/living/generated/HTMLMenuElement.js | 156 - .../jsdom/living/generated/HTMLMetaElement.js | 261 - .../living/generated/HTMLMeterElement.js | 338 - .../jsdom/living/generated/HTMLModElement.js | 202 - .../living/generated/HTMLOListElement.js | 266 - .../living/generated/HTMLObjectElement.js | 839 - .../living/generated/HTMLOptGroupElement.js | 192 - .../living/generated/HTMLOptionElement.js | 351 - .../living/generated/HTMLOptionsCollection.js | 533 - .../living/generated/HTMLOutputElement.js | 371 - .../living/generated/HTMLParagraphElement.js | 153 - .../living/generated/HTMLParamElement.js | 261 - .../living/generated/HTMLPictureElement.js | 115 - .../jsdom/living/generated/HTMLPreElement.js | 158 - .../living/generated/HTMLProgressElement.js | 209 - .../living/generated/HTMLQuoteElement.js | 166 - .../living/generated/HTMLScriptElement.js | 424 - .../living/generated/HTMLSelectElement.js | 957 - .../jsdom/living/generated/HTMLSlotElement.js | 188 - .../living/generated/HTMLSourceElement.js | 310 - .../jsdom/living/generated/HTMLSpanElement.js | 115 - .../living/generated/HTMLStyleElement.js | 200 - .../generated/HTMLTableCaptionElement.js | 153 - .../living/generated/HTMLTableCellElement.js | 635 - .../living/generated/HTMLTableColElement.js | 339 - .../living/generated/HTMLTableElement.js | 725 - .../living/generated/HTMLTableRowElement.js | 386 - .../generated/HTMLTableSectionElement.js | 329 - .../living/generated/HTMLTemplateElement.js | 126 - .../living/generated/HTMLTextAreaElement.js | 1088 - .../jsdom/living/generated/HTMLTimeElement.js | 153 - .../living/generated/HTMLTitleElement.js | 152 - .../living/generated/HTMLTrackElement.js | 334 - .../living/generated/HTMLUListElement.js | 192 - .../living/generated/HTMLUnknownElement.js | 114 - .../living/generated/HTMLVideoElement.js | 310 - .../jsdom/living/generated/HashChangeEvent.js | 153 - .../living/generated/HashChangeEventInit.js | 44 - .../lib/jsdom/living/generated/Headers.js | 379 - .../lib/jsdom/living/generated/History.js | 256 - .../lib/jsdom/living/generated/InputEvent.js | 164 - .../jsdom/living/generated/InputEventInit.js | 59 - .../jsdom/living/generated/KeyboardEvent.js | 413 - .../living/generated/KeyboardEventInit.js | 104 - .../lib/jsdom/living/generated/Location.js | 370 - .../jsdom/living/generated/MessageEvent.js | 301 - .../living/generated/MessageEventInit.js | 94 - .../lib/jsdom/living/generated/MimeType.js | 151 - .../jsdom/living/generated/MimeTypeArray.js | 330 - .../lib/jsdom/living/generated/MouseEvent.js | 463 - .../jsdom/living/generated/MouseEventInit.js | 108 - .../living/generated/MutationCallback.js | 38 - .../living/generated/MutationObserver.js | 171 - .../living/generated/MutationObserverInit.js | 103 - .../jsdom/living/generated/MutationRecord.js | 216 - .../jsdom/living/generated/NamedNodeMap.js | 522 - .../lib/jsdom/living/generated/Navigator.js | 297 - .../jsdom/lib/jsdom/living/generated/Node.js | 736 - .../lib/jsdom/living/generated/NodeFilter.js | 74 - .../jsdom/living/generated/NodeIterator.js | 196 - .../lib/jsdom/living/generated/NodeList.js | 309 - .../OnBeforeUnloadEventHandlerNonNull.js | 46 - .../generated/OnErrorEventHandlerNonNull.js | 60 - .../living/generated/PageTransitionEvent.js | 146 - .../generated/PageTransitionEventInit.js | 32 - .../lib/jsdom/living/generated/Performance.js | 145 - .../lib/jsdom/living/generated/Plugin.js | 361 - .../lib/jsdom/living/generated/PluginArray.js | 340 - .../jsdom/living/generated/PopStateEvent.js | 142 - .../living/generated/PopStateEventInit.js | 32 - .../living/generated/ProcessingInstruction.js | 125 - .../jsdom/living/generated/ProgressEvent.js | 166 - .../living/generated/ProgressEventInit.js | 56 - .../jsdom/lib/jsdom/living/generated/Range.js | 619 - .../living/generated/SVGAnimatedString.js | 143 - .../living/generated/SVGBoundingBoxOptions.js | 64 - .../lib/jsdom/living/generated/SVGElement.js | 1986 -- .../living/generated/SVGGraphicsElement.js | 144 - .../lib/jsdom/living/generated/SVGNumber.js | 130 - .../jsdom/living/generated/SVGSVGElement.js | 681 - .../jsdom/living/generated/SVGStringList.js | 504 - .../jsdom/living/generated/SVGTitleElement.js | 114 - .../lib/jsdom/living/generated/Screen.js | 173 - .../jsdom/living/generated/ScrollBehavior.js | 12 - .../living/generated/ScrollIntoViewOptions.js | 45 - .../living/generated/ScrollLogicalPosition.js | 12 - .../jsdom/living/generated/ScrollOptions.js | 30 - .../living/generated/ScrollRestoration.js | 12 - .../lib/jsdom/living/generated/Selection.js | 527 - .../jsdom/living/generated/SelectionMode.js | 12 - .../lib/jsdom/living/generated/ShadowRoot.js | 185 - .../jsdom/living/generated/ShadowRootInit.js | 30 - .../jsdom/living/generated/ShadowRootMode.js | 12 - .../lib/jsdom/living/generated/StaticRange.js | 126 - .../jsdom/living/generated/StaticRangeInit.js | 66 - .../lib/jsdom/living/generated/Storage.js | 389 - .../jsdom/living/generated/StorageEvent.js | 305 - .../living/generated/StorageEventInit.js | 93 - .../jsdom/living/generated/StyleSheetList.js | 307 - .../jsdom/living/generated/SupportedType.js | 18 - .../jsdom/lib/jsdom/living/generated/Text.js | 169 - .../jsdom/living/generated/TextTrackKind.js | 12 - .../lib/jsdom/living/generated/TouchEvent.js | 208 - .../jsdom/living/generated/TouchEventInit.js | 89 - .../lib/jsdom/living/generated/TreeWalker.js | 236 - .../lib/jsdom/living/generated/UIEvent.js | 235 - .../lib/jsdom/living/generated/UIEventInit.js | 59 - .../jsdom/living/generated/ValidityState.js | 228 - .../jsdom/living/generated/VisibilityState.js | 12 - .../jsdom/living/generated/VoidFunction.js | 30 - .../lib/jsdom/living/generated/WebSocket.js | 444 - .../lib/jsdom/living/generated/WheelEvent.js | 183 - .../jsdom/living/generated/WheelEventInit.js | 68 - .../lib/jsdom/living/generated/XMLDocument.js | 114 - .../jsdom/living/generated/XMLHttpRequest.js | 617 - .../generated/XMLHttpRequestEventTarget.js | 341 - .../generated/XMLHttpRequestResponseType.js | 12 - .../living/generated/XMLHttpRequestUpload.js | 114 - .../jsdom/living/generated/XMLSerializer.js | 133 - .../jsdom/lib/jsdom/living/generated/utils.js | 141 - .../lib/jsdom/living/helpers/binary-data.js | 9 - .../jsdom/living/helpers/create-element.js | 320 - .../living/helpers/create-event-accessor.js | 188 - .../jsdom/living/helpers/custom-elements.js | 270 - .../jsdom/living/helpers/dates-and-times.js | 270 - .../jsdom/lib/jsdom/living/helpers/details.js | 15 - .../jsdom/living/helpers/document-base-url.js | 54 - .../jsdom/lib/jsdom/living/helpers/events.js | 24 - .../lib/jsdom/living/helpers/focusing.js | 104 - .../lib/jsdom/living/helpers/form-controls.js | 313 - .../jsdom/living/helpers/html-constructor.js | 78 - .../living/helpers/internal-constants.js | 12 - .../jsdom/living/helpers/iterable-weak-set.js | 48 - .../jsdom/lib/jsdom/living/helpers/json.js | 12 - .../living/helpers/mutation-observers.js | 198 - .../lib/jsdom/living/helpers/namespaces.js | 15 - .../jsdom/lib/jsdom/living/helpers/node.js | 68 - .../living/helpers/number-and-date-inputs.js | 195 - .../lib/jsdom/living/helpers/ordered-set.js | 104 - .../living/helpers/runtime-script-errors.js | 72 - .../lib/jsdom/living/helpers/selectors.js | 47 - .../lib/jsdom/living/helpers/shadow-dom.js | 285 - .../jsdom/lib/jsdom/living/helpers/strings.js | 148 - .../lib/jsdom/living/helpers/style-rules.js | 110 - .../lib/jsdom/living/helpers/stylesheets.js | 113 - .../jsdom/living/helpers/svg/basic-types.js | 41 - .../lib/jsdom/living/helpers/svg/render.js | 46 - .../jsdom/lib/jsdom/living/helpers/text.js | 19 - .../lib/jsdom/living/helpers/traversal.js | 72 - .../jsdom/living/helpers/validate-names.js | 75 - .../helpers/wrap-cookie-jar-for-request.js | 8 - .../jsdom/living/hr-time/Performance-impl.js | 25 - .../jsdom/lib/jsdom/living/interfaces.js | 217 - .../MutationObserver-impl.js | 95 - .../mutation-observer/MutationRecord-impl.js | 37 - .../jsdom/living/named-properties-window.js | 141 - .../jsdom/living/navigator/MimeType-impl.js | 3 - .../living/navigator/MimeTypeArray-impl.js | 21 - .../jsdom/living/navigator/Navigator-impl.js | 29 - .../NavigatorConcurrentHardware-impl.js | 8 - .../living/navigator/NavigatorCookies-impl.js | 7 - .../living/navigator/NavigatorID-impl.js | 37 - .../navigator/NavigatorLanguage-impl.js | 9 - .../living/navigator/NavigatorOnLine-impl.js | 7 - .../living/navigator/NavigatorPlugins-impl.js | 8 - .../lib/jsdom/living/navigator/Plugin-impl.js | 3 - .../living/navigator/PluginArray-impl.js | 23 - .../jsdom/living/node-document-position.js | 10 - .../jsdom/lib/jsdom/living/node-type.js | 16 - node_modules/jsdom/lib/jsdom/living/node.js | 331 - .../jsdom/living/nodes/CDATASection-impl.js | 16 - .../jsdom/living/nodes/CharacterData-impl.js | 118 - .../lib/jsdom/living/nodes/ChildNode-impl.js | 80 - .../lib/jsdom/living/nodes/Comment-impl.js | 20 - .../living/nodes/DOMImplementation-impl.js | 120 - .../jsdom/living/nodes/DOMStringMap-impl.js | 64 - .../jsdom/living/nodes/DOMTokenList-impl.js | 171 - .../lib/jsdom/living/nodes/Document-impl.js | 946 - .../living/nodes/DocumentFragment-impl.js | 44 - .../living/nodes/DocumentOrShadowRoot-impl.js | 28 - .../jsdom/living/nodes/DocumentType-impl.js | 24 - .../lib/jsdom/living/nodes/Element-impl.js | 592 - .../nodes/ElementCSSInlineStyle-impl.js | 25 - .../nodes/ElementContentEditable-impl.js | 7 - .../living/nodes/GlobalEventHandlers-impl.js | 95 - .../living/nodes/HTMLAnchorElement-impl.js | 50 - .../living/nodes/HTMLAreaElement-impl.js | 43 - .../living/nodes/HTMLAudioElement-impl.js | 9 - .../jsdom/living/nodes/HTMLBRElement-impl.js | 9 - .../living/nodes/HTMLBaseElement-impl.js | 27 - .../living/nodes/HTMLBodyElement-impl.js | 17 - .../living/nodes/HTMLButtonElement-impl.js | 79 - .../living/nodes/HTMLCanvasElement-impl.js | 130 - .../jsdom/living/nodes/HTMLCollection-impl.js | 96 - .../living/nodes/HTMLDListElement-impl.js | 9 - .../living/nodes/HTMLDataElement-impl.js | 9 - .../living/nodes/HTMLDataListElement-impl.js | 20 - .../living/nodes/HTMLDetailsElement-impl.js | 35 - .../living/nodes/HTMLDialogElement-impl.js | 9 - .../living/nodes/HTMLDirectoryElement-impl.js | 9 - .../jsdom/living/nodes/HTMLDivElement-impl.js | 9 - .../jsdom/living/nodes/HTMLElement-impl.js | 160 - .../living/nodes/HTMLEmbedElement-impl.js | 8 - .../living/nodes/HTMLFieldSetElement-impl.js | 43 - .../living/nodes/HTMLFontElement-impl.js | 9 - .../living/nodes/HTMLFormElement-impl.js | 226 - .../living/nodes/HTMLFrameElement-impl.js | 261 - .../living/nodes/HTMLFrameSetElement-impl.js | 17 - .../jsdom/living/nodes/HTMLHRElement-impl.js | 9 - .../living/nodes/HTMLHeadElement-impl.js | 9 - .../living/nodes/HTMLHeadingElement-impl.js | 9 - .../living/nodes/HTMLHtmlElement-impl.js | 9 - .../nodes/HTMLHyperlinkElementUtils-impl.js | 371 - .../living/nodes/HTMLIFrameElement-impl.js | 9 - .../living/nodes/HTMLImageElement-impl.js | 132 - .../living/nodes/HTMLInputElement-impl.js | 1128 - .../jsdom/living/nodes/HTMLLIElement-impl.js | 9 - .../living/nodes/HTMLLabelElement-impl.js | 94 - .../living/nodes/HTMLLegendElement-impl.js | 18 - .../living/nodes/HTMLLinkElement-impl.js | 101 - .../jsdom/living/nodes/HTMLMapElement-impl.js | 13 - .../living/nodes/HTMLMarqueeElement-impl.js | 9 - .../living/nodes/HTMLMediaElement-impl.js | 138 - .../living/nodes/HTMLMenuElement-impl.js | 9 - .../living/nodes/HTMLMetaElement-impl.js | 9 - .../living/nodes/HTMLMeterElement-impl.js | 180 - .../jsdom/living/nodes/HTMLModElement-impl.js | 9 - .../living/nodes/HTMLOListElement-impl.js | 22 - .../living/nodes/HTMLObjectElement-impl.js | 26 - .../living/nodes/HTMLOptGroupElement-impl.js | 9 - .../living/nodes/HTMLOptionElement-impl.js | 146 - .../nodes/HTMLOptionsCollection-impl.js | 110 - .../living/nodes/HTMLOrSVGElement-impl.js | 85 - .../living/nodes/HTMLOutputElement-impl.js | 88 - .../living/nodes/HTMLParagraphElement-impl.js | 9 - .../living/nodes/HTMLParamElement-impl.js | 9 - .../living/nodes/HTMLPictureElement-impl.js | 9 - .../jsdom/living/nodes/HTMLPreElement-impl.js | 9 - .../living/nodes/HTMLProgressElement-impl.js | 74 - .../living/nodes/HTMLQuoteElement-impl.js | 9 - .../living/nodes/HTMLScriptElement-impl.js | 265 - .../living/nodes/HTMLSelectElement-impl.js | 283 - .../living/nodes/HTMLSlotElement-impl.js | 59 - .../living/nodes/HTMLSourceElement-impl.js | 8 - .../living/nodes/HTMLSpanElement-impl.js | 9 - .../living/nodes/HTMLStyleElement-impl.js | 74 - .../nodes/HTMLTableCaptionElement-impl.js | 9 - .../living/nodes/HTMLTableCellElement-impl.js | 73 - .../living/nodes/HTMLTableColElement-impl.js | 9 - .../living/nodes/HTMLTableElement-impl.js | 236 - .../living/nodes/HTMLTableRowElement-impl.js | 88 - .../nodes/HTMLTableSectionElement-impl.js | 61 - .../living/nodes/HTMLTemplateElement-impl.js | 67 - .../living/nodes/HTMLTextAreaElement-impl.js | 244 - .../living/nodes/HTMLTimeElement-impl.js | 9 - .../living/nodes/HTMLTitleElement-impl.js | 18 - .../living/nodes/HTMLTrackElement-impl.js | 13 - .../living/nodes/HTMLUListElement-impl.js | 9 - .../living/nodes/HTMLUnknownElement-impl.js | 9 - .../living/nodes/HTMLVideoElement-impl.js | 17 - .../lib/jsdom/living/nodes/LinkStyle-impl.js | 2 - .../jsdom/lib/jsdom/living/nodes/Node-impl.js | 1165 - .../lib/jsdom/living/nodes/NodeList-impl.js | 43 - .../nodes/NonDocumentTypeChildNode-impl.js | 28 - .../living/nodes/NonElementParentNode-impl.js | 11 - .../lib/jsdom/living/nodes/ParentNode-impl.js | 85 - .../nodes/ProcessingInstruction-impl.js | 22 - .../lib/jsdom/living/nodes/SVGElement-impl.js | 64 - .../living/nodes/SVGGraphicsElement-impl.js | 16 - .../jsdom/living/nodes/SVGSVGElement-impl.js | 42 - .../lib/jsdom/living/nodes/SVGTests-impl.js | 42 - .../living/nodes/SVGTitleElement-impl.js | 9 - .../lib/jsdom/living/nodes/ShadowRoot-impl.js | 52 - .../lib/jsdom/living/nodes/Slotable-impl.js | 48 - .../jsdom/lib/jsdom/living/nodes/Text-impl.js | 96 - .../living/nodes/WindowEventHandlers-impl.js | 52 - .../jsdom/living/nodes/XMLDocument-impl.js | 4 - .../jsdom/lib/jsdom/living/post-message.js | 39 - .../jsdom/living/range/AbstractRange-impl.js | 43 - .../lib/jsdom/living/range/Range-impl.js | 889 - .../jsdom/living/range/StaticRange-impl.js | 39 - .../lib/jsdom/living/range/boundary-point.js | 47 - .../jsdom/living/selection/Selection-impl.js | 342 - .../living/svg/SVGAnimatedString-impl.js | 38 - .../jsdom/lib/jsdom/living/svg/SVGListBase.js | 195 - .../lib/jsdom/living/svg/SVGNumber-impl.js | 48 - .../jsdom/living/svg/SVGStringList-impl.js | 16 - .../living/traversal/NodeIterator-impl.js | 127 - .../jsdom/living/traversal/TreeWalker-impl.js | 217 - .../lib/jsdom/living/traversal/helpers.js | 44 - .../websockets/WebSocket-impl-browser.js | 175 - .../jsdom/living/websockets/WebSocket-impl.js | 328 - .../jsdom/living/webstorage/Storage-impl.js | 102 - .../lib/jsdom/living/window/BarProp-impl.js | 10 - .../lib/jsdom/living/window/External-impl.js | 9 - .../lib/jsdom/living/window/History-impl.js | 134 - .../lib/jsdom/living/window/History.webidl | 14 - .../lib/jsdom/living/window/Location-impl.js | 238 - .../lib/jsdom/living/window/Screen-impl.js | 13 - .../lib/jsdom/living/window/SessionHistory.js | 163 - .../lib/jsdom/living/window/navigation.js | 84 - .../lib/jsdom/living/xhr/FormData-impl.js | 176 - .../jsdom/living/xhr/XMLHttpRequest-impl.js | 1026 - .../xhr/XMLHttpRequestEventTarget-impl.js | 17 - .../living/xhr/XMLHttpRequestUpload-impl.js | 4 - .../lib/jsdom/living/xhr/xhr-sync-worker.js | 60 - .../jsdom/lib/jsdom/living/xhr/xhr-utils.js | 432 - .../lib/jsdom/named-properties-tracker.js | 158 - node_modules/jsdom/lib/jsdom/utils.js | 165 - .../jsdom/lib/jsdom/virtual-console.js | 34 - node_modules/jsdom/lib/jsdom/vm-shim.js | 106 - node_modules/jsdom/node_modules/.bin/acorn | 1 - .../jsdom/node_modules/acorn/CHANGELOG.md | 686 - node_modules/jsdom/node_modules/acorn/LICENSE | 21 - .../jsdom/node_modules/acorn/README.md | 275 - .../jsdom/node_modules/acorn/bin/acorn | 4 - .../jsdom/node_modules/acorn/dist/acorn.d.ts | 209 - .../jsdom/node_modules/acorn/dist/acorn.js | 5294 ---- .../node_modules/acorn/dist/acorn.js.map | 1 - .../jsdom/node_modules/acorn/dist/acorn.mjs | 5263 ---- .../node_modules/acorn/dist/acorn.mjs.d.ts | 2 - .../node_modules/acorn/dist/acorn.mjs.map | 1 - .../jsdom/node_modules/acorn/dist/bin.js | 65 - .../jsdom/node_modules/acorn/package.json | 78 - node_modules/jsdom/package.json | 174 - node_modules/json-schema/README.md | 5 - .../json-schema/draft-00/hyper-schema | 68 - node_modules/json-schema/draft-00/json-ref | 26 - node_modules/json-schema/draft-00/links | 33 - node_modules/json-schema/draft-00/schema | 155 - .../json-schema/draft-01/hyper-schema | 68 - node_modules/json-schema/draft-01/json-ref | 26 - node_modules/json-schema/draft-01/links | 33 - node_modules/json-schema/draft-01/schema | 155 - .../json-schema/draft-02/hyper-schema | 68 - node_modules/json-schema/draft-02/json-ref | 26 - node_modules/json-schema/draft-02/links | 35 - node_modules/json-schema/draft-02/schema | 166 - .../json-schema/draft-03/examples/address | 20 - .../json-schema/draft-03/examples/calendar | 53 - .../json-schema/draft-03/examples/card | 105 - .../json-schema/draft-03/examples/geo | 8 - .../json-schema/draft-03/examples/interfaces | 23 - .../json-schema/draft-03/hyper-schema | 60 - node_modules/json-schema/draft-03/json-ref | 26 - node_modules/json-schema/draft-03/links | 35 - node_modules/json-schema/draft-03/schema | 174 - .../json-schema/draft-04/hyper-schema | 60 - node_modules/json-schema/draft-04/links | 41 - node_modules/json-schema/draft-04/schema | 189 - .../json-schema/draft-zyp-json-schema-03.xml | 1120 - .../json-schema/draft-zyp-json-schema-04.xml | 1072 - node_modules/json-schema/lib/links.js | 66 - node_modules/json-schema/lib/validate.js | 273 - node_modules/json-schema/package.json | 71 - node_modules/json-schema/test/tests.js | 95 - node_modules/json-stringify-safe/.npmignore | 1 - node_modules/json-stringify-safe/CHANGELOG.md | 14 - node_modules/json-stringify-safe/LICENSE | 15 - node_modules/json-stringify-safe/Makefile | 35 - node_modules/json-stringify-safe/README.md | 52 - node_modules/json-stringify-safe/package.json | 66 - node_modules/json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - node_modules/json5/CHANGELOG.md | 362 - node_modules/json5/README.md | 88 +- node_modules/json5/dist/index.js | 41 +- node_modules/json5/dist/index.min.js | 2 +- node_modules/json5/dist/index.min.mjs | 2 +- node_modules/json5/dist/index.mjs | 41 +- node_modules/json5/lib/cli.js | 90 +- node_modules/json5/lib/parse.js | 41 +- node_modules/json5/package.json | 131 +- node_modules/jsprim/CHANGES.md | 49 - node_modules/jsprim/CONTRIBUTING.md | 19 - node_modules/jsprim/LICENSE | 19 - node_modules/jsprim/README.md | 287 - node_modules/jsprim/lib/jsprim.js | 735 - node_modules/jsprim/package.json | 49 - node_modules/kind-of/CHANGELOG.md | 160 - node_modules/kind-of/LICENSE | 21 - node_modules/kind-of/README.md | 367 - node_modules/kind-of/index.js | 129 - node_modules/kind-of/package.json | 156 - node_modules/lines-and-columns/README.md | 14 +- .../lines-and-columns/build/index.d.ts | 13 + node_modules/lines-and-columns/build/index.js | 62 + .../lines-and-columns/dist/index.d.ts | 12 - node_modules/lines-and-columns/dist/index.js | 58 - node_modules/lines-and-columns/dist/index.mjs | 56 - node_modules/lines-and-columns/package.json | 96 +- node_modules/makeerror/package.json | 52 +- node_modules/map-cache/LICENSE | 21 - node_modules/map-cache/README.md | 145 - node_modules/map-cache/index.js | 100 - node_modules/map-cache/package.json | 91 - node_modules/map-visit/LICENSE | 21 - node_modules/map-visit/README.md | 155 - node_modules/map-visit/index.js | 37 - node_modules/map-visit/package.json | 113 - node_modules/micromatch/CHANGELOG.md | 108 - node_modules/micromatch/README.md | 135 +- node_modules/micromatch/index.js | 28 +- node_modules/micromatch/package.json | 151 +- node_modules/mime-db/HISTORY.md | 473 - node_modules/mime-db/LICENSE | 22 - node_modules/mime-db/README.md | 100 - node_modules/mime-db/db.json | 8323 ------ node_modules/mime-db/index.js | 11 - node_modules/mime-db/package.json | 102 - node_modules/mime-types/HISTORY.md | 363 - node_modules/mime-types/LICENSE | 23 - node_modules/mime-types/README.md | 113 - node_modules/mime-types/index.js | 188 - node_modules/mime-types/package.json | 88 - node_modules/minimist/.travis.yml | 8 - node_modules/minimist/LICENSE | 18 - node_modules/minimist/example/parse.js | 2 - node_modules/minimist/index.js | 245 - node_modules/minimist/package.json | 75 - node_modules/minimist/readme.markdown | 95 - node_modules/minimist/test/all_bool.js | 32 - node_modules/minimist/test/bool.js | 178 - node_modules/minimist/test/dash.js | 31 - node_modules/minimist/test/default_bool.js | 35 - node_modules/minimist/test/dotted.js | 22 - node_modules/minimist/test/kv_short.js | 16 - node_modules/minimist/test/long.js | 31 - node_modules/minimist/test/num.js | 36 - node_modules/minimist/test/parse.js | 197 - node_modules/minimist/test/parse_modified.js | 9 - node_modules/minimist/test/proto.js | 44 - node_modules/minimist/test/short.js | 67 - node_modules/minimist/test/stop_early.js | 15 - node_modules/minimist/test/unknown.js | 102 - node_modules/minimist/test/whitespace.js | 8 - node_modules/mixin-deep/LICENSE | 21 - node_modules/mixin-deep/README.md | 80 - node_modules/mixin-deep/index.js | 64 - .../node_modules/is-extendable/LICENSE | 21 - .../node_modules/is-extendable/README.md | 88 - .../node_modules/is-extendable/index.d.ts | 5 - .../node_modules/is-extendable/index.js | 14 - .../node_modules/is-extendable/package.json | 98 - .../node_modules/is-plain-object/LICENSE | 21 - .../node_modules/is-plain-object/README.md | 104 - .../node_modules/is-plain-object/index.d.ts | 5 - .../node_modules/is-plain-object/index.js | 37 - .../node_modules/is-plain-object/package.json | 121 - node_modules/mixin-deep/package.json | 98 - node_modules/nanomatch/CHANGELOG.md | 57 - node_modules/nanomatch/LICENSE | 21 - node_modules/nanomatch/README.md | 1148 - node_modules/nanomatch/index.js | 838 - node_modules/nanomatch/lib/cache.js | 1 - node_modules/nanomatch/lib/compilers.js | 339 - node_modules/nanomatch/lib/parsers.js | 386 - node_modules/nanomatch/lib/utils.js | 379 - node_modules/nanomatch/package.json | 171 - node_modules/nice-try/CHANGELOG.md | 21 - node_modules/nice-try/LICENSE | 21 - node_modules/nice-try/README.md | 32 - node_modules/nice-try/package.json | 61 - node_modules/nice-try/src/index.js | 12 - node_modules/node-int64/package.json | 60 +- node_modules/node-modules-regexp/index.js | 2 - node_modules/node-modules-regexp/license | 21 - node_modules/node-modules-regexp/package.json | 76 - node_modules/node-modules-regexp/readme.md | 32 - node_modules/node-notifier/.prettierrc | 5 - node_modules/node-notifier/CHANGELOG.md | 328 - node_modules/node-notifier/LICENSE | 21 - node_modules/node-notifier/README.md | 461 - node_modules/node-notifier/index.js | 52 - node_modules/node-notifier/lib/checkGrowl.js | 24 - node_modules/node-notifier/lib/utils.js | 568 - .../node-notifier/notifiers/balloon.js | 164 - node_modules/node-notifier/notifiers/growl.js | 83 - .../notifiers/notificationcenter.js | 107 - .../node-notifier/notifiers/notifysend.js | 101 - .../node-notifier/notifiers/toaster.js | 160 - node_modules/node-notifier/package.json | 107 - .../terminal-notifier.app/Contents/Info.plist | 63 - .../Contents/MacOS/terminal-notifier | Bin 87688 -> 0 bytes .../terminal-notifier.app/Contents/PkgInfo | 1 - .../Contents/Resources/Terminal.icns | Bin 369386 -> 0 bytes .../Contents/Resources/en.lproj/Credits.rtf | 29 - .../Resources/en.lproj/InfoPlist.strings | Bin 92 -> 0 bytes .../Contents/Resources/en.lproj/MainMenu.nib | Bin 25790 -> 0 bytes .../node-notifier/vendor/notifu/LICENSE | 25 - .../node-notifier/vendor/notifu/notifu.exe | Bin 245760 -> 0 bytes .../node-notifier/vendor/notifu/notifu64.exe | Bin 296448 -> 0 bytes .../node-notifier/vendor/snoreToast/LICENSE | 166 - .../vendor/snoreToast/snoretoast-x64.exe | Bin 2519032 -> 0 bytes .../vendor/snoreToast/snoretoast-x86.exe | Bin 2065912 -> 0 bytes .../vendor/terminal-notifier-LICENSE | 9 - .../.github/workflows/nightly-sync.yml | 35 - node_modules/node-releases/README.md | 25 +- .../node-releases/data/processed/envs.json | 1476 +- node_modules/node-releases/data/raw/iojs.json | 43 - .../node-releases/data/raw/nodejs.json | 565 - .../release-schedule/release-schedule.json | 94 +- node_modules/node-releases/package.json | 57 +- node_modules/normalize-package-data/AUTHORS | 4 - node_modules/normalize-package-data/LICENSE | 30 - node_modules/normalize-package-data/README.md | 106 - .../lib/extract_description.js | 14 - .../normalize-package-data/lib/fixer.js | 418 - .../lib/make_warning.js | 23 - .../normalize-package-data/lib/normalize.js | 39 - .../normalize-package-data/lib/safe_format.js | 9 - .../normalize-package-data/lib/typos.json | 25 - .../lib/warning_messages.json | 30 - .../node_modules/.bin/semver | 1 - .../node_modules/semver/CHANGELOG.md | 39 - .../node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 412 - .../node_modules/semver/bin/semver | 160 - .../node_modules/semver/package.json | 60 - .../node_modules/semver/range.bnf | 16 - .../node_modules/semver/semver.js | 1483 - .../normalize-package-data/package.json | 77 - .../node_modules => }/npm-run-path/index.d.ts | 0 node_modules/npm-run-path/index.js | 54 +- node_modules/npm-run-path/license | 20 +- .../node_modules/path-key/index.js | 13 - .../node_modules/path-key/license | 21 - .../node_modules/path-key/package.json | 71 - .../node_modules/path-key/readme.md | 51 - node_modules/npm-run-path/package.json | 117 +- node_modules/npm-run-path/readme.md | 44 +- node_modules/nwsapi/LICENSE | 22 - node_modules/nwsapi/README.md | 132 - node_modules/nwsapi/dist/lint.log | 0 node_modules/nwsapi/package.json | 71 - .../nwsapi/src/modules/nwsapi-jquery.js | 135 - .../nwsapi/src/modules/nwsapi-traversal.js | 90 - node_modules/nwsapi/src/nwsapi.js | 1800 -- node_modules/oauth-sign/LICENSE | 55 - node_modules/oauth-sign/README.md | 11 - node_modules/oauth-sign/index.js | 146 - node_modules/oauth-sign/package.json | 56 - node_modules/object-copy/LICENSE | 21 - node_modules/object-copy/index.js | 174 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 82 - .../object-copy/node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../object-copy/node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 139 - node_modules/object-copy/package.json | 81 - node_modules/object-visit/LICENSE | 21 - node_modules/object-visit/README.md | 83 - node_modules/object-visit/index.js | 33 - node_modules/object-visit/package.json | 97 - node_modules/object.pick/LICENSE | 21 - node_modules/object.pick/README.md | 76 - node_modules/object.pick/index.js | 35 - node_modules/object.pick/package.json | 92 - node_modules/p-each-series/index.d.ts | 64 - node_modules/p-each-series/index.js | 22 - node_modules/p-each-series/license | 9 - node_modules/p-each-series/package.json | 80 - node_modules/p-each-series/readme.md | 78 - node_modules/p-finally/index.js | 15 - node_modules/p-finally/license | 21 - node_modules/p-finally/package.json | 74 - node_modules/p-finally/readme.md | 47 - node_modules/p-limit/index.d.ts | 64 +- node_modules/p-limit/index.js | 48 +- node_modules/p-limit/license | 2 +- node_modules/p-limit/package.json | 132 +- node_modules/p-limit/readme.md | 2 +- .../p-locate/node_modules/p-limit/index.d.ts | 38 + .../p-locate/node_modules/p-limit/index.js | 57 + .../node_modules/p-limit}/license | 0 .../node_modules/p-limit/package.json | 52 + .../p-locate/node_modules/p-limit/readme.md | 101 + node_modules/parse5/LICENSE | 19 - node_modules/parse5/README.md | 38 - node_modules/parse5/lib/common/doctype.js | 162 - node_modules/parse5/lib/common/error-codes.js | 65 - .../parse5/lib/common/foreign-content.js | 265 - node_modules/parse5/lib/common/html.js | 272 - node_modules/parse5/lib/common/unicode.js | 109 - .../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 | 223 - .../location-info/tokenizer-mixin.js | 146 - .../position-tracking/preprocessor-mixin.js | 64 - node_modules/parse5/lib/index.js | 29 - .../lib/parser/formatting-element-list.js | 181 - node_modules/parse5/lib/parser/index.js | 2956 -- .../parse5/lib/parser/open-element-stack.js | 482 - node_modules/parse5/lib/serializer/index.js | 176 - node_modules/parse5/lib/tokenizer/index.js | 2196 -- .../parse5/lib/tokenizer/named-entity-data.js | 5 - .../parse5/lib/tokenizer/preprocessor.js | 159 - .../parse5/lib/tree-adapters/default.js | 221 - .../parse5/lib/utils/merge-options.js | 13 - node_modules/parse5/lib/utils/mixin.js | 39 - node_modules/parse5/package.json | 67 - node_modules/pascalcase/LICENSE | 21 - node_modules/pascalcase/README.md | 80 - node_modules/pascalcase/index.js | 21 - node_modules/pascalcase/package.json | 77 - node_modules/path-parse/.travis.yml | 9 - node_modules/path-parse/index.js | 52 +- node_modules/path-parse/package.json | 54 +- node_modules/path-parse/test.js | 77 - node_modules/performance-now/.npmignore | 1 - node_modules/performance-now/.tm_properties | 7 - node_modules/performance-now/.travis.yml | 6 - node_modules/performance-now/README.md | 30 - .../performance-now/lib/performance-now.js | 36 - .../lib/performance-now.js.map | 10 - node_modules/performance-now/license.txt | 7 - node_modules/performance-now/package.json | 65 - node_modules/performance-now/src/index.d.ts | 8 - .../src/performance-now.coffee | 17 - node_modules/performance-now/test/mocha.opts | 3 - .../test/performance-now.coffee | 43 - .../performance-now/test/scripts.coffee | 27 - .../test/scripts/delayed-call.coffee | 11 - .../test/scripts/delayed-require.coffee | 12 - .../test/scripts/difference.coffee | 6 - .../test/scripts/initial-value.coffee | 10 - node_modules/picocolors/LICENSE | 15 + node_modules/picocolors/README.md | 21 + node_modules/picocolors/package.json | 25 + node_modules/picocolors/picocolors.browser.js | 4 + node_modules/picocolors/picocolors.d.ts | 5 + node_modules/picocolors/picocolors.js | 58 + node_modules/picocolors/types.ts | 30 + node_modules/picomatch/CHANGELOG.md | 23 + node_modules/picomatch/LICENSE | 0 node_modules/picomatch/README.md | 49 +- node_modules/picomatch/index.js | 0 node_modules/picomatch/lib/constants.js | 0 node_modules/picomatch/lib/parse.js | 27 +- node_modules/picomatch/lib/picomatch.js | 65 +- node_modules/picomatch/lib/scan.js | 20 +- node_modules/picomatch/lib/utils.js | 0 node_modules/picomatch/package.json | 78 +- node_modules/pirates/README.md | 34 +- node_modules/pirates/index.d.ts | 66 +- node_modules/pirates/lib/index.js | 65 +- node_modules/pirates/package.json | 127 +- node_modules/posix-character-classes/LICENSE | 21 - .../posix-character-classes/README.md | 103 - node_modules/posix-character-classes/index.js | 22 - .../posix-character-classes/package.json | 85 - node_modules/pretty-format/LICENSE | 2 +- node_modules/pretty-format/README.md | 85 +- .../pretty-format/build/collections.d.ts | 32 - .../pretty-format/build/collections.js | 81 +- node_modules/pretty-format/build/index.d.ts | 178 +- node_modules/pretty-format/build/index.js | 302 +- .../build/plugins/AsymmetricMatcher.d.ts | 11 - .../build/plugins/AsymmetricMatcher.js | 70 +- .../build/plugins/ConvertAnsi.d.ts | 11 - .../build/plugins/ConvertAnsi.js | 96 - .../build/plugins/DOMCollection.d.ts | 11 - .../build/plugins/DOMCollection.js | 33 +- .../build/plugins/DOMElement.d.ts | 11 - .../pretty-format/build/plugins/DOMElement.js | 48 +- .../build/plugins/Immutable.d.ts | 11 - .../pretty-format/build/plugins/Immutable.js | 110 +- .../build/plugins/ReactElement.d.ts | 11 - .../build/plugins/ReactElement.js | 55 +- .../build/plugins/ReactTestComponent.d.ts | 18 - .../build/plugins/ReactTestComponent.js | 11 +- .../build/plugins/lib/escapeHTML.d.ts | 7 - .../build/plugins/lib/escapeHTML.js | 4 +- .../build/plugins/lib/markup.d.ts | 13 - .../pretty-format/build/plugins/lib/markup.js | 100 +- node_modules/pretty-format/build/types.d.ts | 100 - .../node_modules/ansi-styles/index.d.ts | 252 +- .../node_modules/ansi-styles/index.js | 123 +- .../node_modules/ansi-styles/package.json | 136 +- .../node_modules/ansi-styles/readme.md | 32 +- .../node_modules/color-convert/CHANGELOG.md | 54 - .../node_modules/color-convert/LICENSE | 21 - .../node_modules/color-convert/README.md | 68 - .../node_modules/color-convert/conversions.js | 839 - .../node_modules/color-convert/index.js | 81 - .../node_modules/color-convert/package.json | 83 - .../node_modules/color-convert/route.js | 97 - .../node_modules/color-name/LICENSE | 8 - .../node_modules/color-name/README.md | 11 - .../node_modules/color-name/index.js | 152 - .../node_modules/color-name/package.json | 56 - node_modules/pretty-format/package.json | 96 +- node_modules/prompts/dist/index.js | 4 +- node_modules/prompts/dist/util/clear.js | 2 +- node_modules/prompts/dist/util/strip.js | 2 +- node_modules/prompts/lib/util/strip.js | 2 +- node_modules/prompts/package.json | 82 +- node_modules/psl/LICENSE | 9 - node_modules/psl/README.md | 215 - node_modules/psl/browserstack-logo.svg | 90 - node_modules/psl/data/rules.json | 8834 ------ node_modules/psl/dist/psl.js | 9645 ------- node_modules/psl/dist/psl.min.js | 1 - node_modules/psl/index.js | 269 - node_modules/psl/package.json | 79 - node_modules/pump/.travis.yml | 5 - node_modules/pump/LICENSE | 21 - node_modules/pump/README.md | 65 - node_modules/pump/index.js | 82 - node_modules/pump/package.json | 60 - node_modules/pump/test-browser.js | 66 - node_modules/pump/test-node.js | 53 - node_modules/pure-rand/CHANGELOG.md | 67 + node_modules/pure-rand/LICENSE | 21 + node_modules/pure-rand/README.md | 208 + .../lib/distribution/Distribution.js | 2 + .../UniformArrayIntDistribution.js | 15 + .../distribution/UniformBigIntDistribution.js | 15 + .../distribution/UniformIntDistribution.js | 15 + .../UnsafeUniformArrayIntDistribution.js | 12 + .../UnsafeUniformBigIntDistribution.js | 28 + .../UnsafeUniformIntDistribution.js | 34 + .../lib/distribution/internals/ArrayInt.js | 141 + ...safeUniformArrayIntDistributionInternal.js | 25 + .../UnsafeUniformIntDistributionInternal.js | 12 + .../lib/esm/distribution/Distribution.js | 1 + .../UniformArrayIntDistribution.js | 12 + .../distribution/UniformBigIntDistribution.js | 12 + .../distribution/UniformIntDistribution.js | 12 + .../UnsafeUniformArrayIntDistribution.js | 8 + .../UnsafeUniformBigIntDistribution.js | 24 + .../UnsafeUniformIntDistribution.js | 30 + .../esm/distribution/internals/ArrayInt.js | 132 + ...safeUniformArrayIntDistributionInternal.js | 21 + .../UnsafeUniformIntDistributionInternal.js | 8 + .../lib/esm/generator/LinearCongruential.js | 37 + .../lib/esm/generator/MersenneTwister.js | 69 + .../lib/esm/generator/RandomGenerator.js | 22 + .../pure-rand/lib/esm/generator/XorShift.js | 59 + .../pure-rand/lib/esm/generator/XoroShiro.js | 59 + node_modules/pure-rand/lib/esm/package.json | 3 + .../pure-rand/lib/esm/pure-rand-default.js | 15 + node_modules/pure-rand/lib/esm/pure-rand.js | 3 + .../lib/generator/LinearCongruential.js | 41 + .../lib/generator/MersenneTwister.js | 72 + .../lib/generator/RandomGenerator.js | 29 + .../pure-rand/lib/generator/XorShift.js | 63 + .../pure-rand/lib/generator/XoroShiro.js | 63 + .../pure-rand/lib/pure-rand-default.js | 34 + node_modules/pure-rand/lib/pure-rand.js | 19 + .../lib/types/distribution/Distribution.d.ts | 2 + .../UniformArrayIntDistribution.d.ts | 6 + .../UniformBigIntDistribution.d.ts | 5 + .../distribution/UniformIntDistribution.d.ts | 5 + .../UnsafeUniformArrayIntDistribution.d.ts | 3 + .../UnsafeUniformBigIntDistribution.d.ts | 2 + .../UnsafeUniformIntDistribution.d.ts | 2 + .../distribution/internals/ArrayInt.d.ts | 13 + ...feUniformArrayIntDistributionInternal.d.ts | 3 + .../UnsafeUniformIntDistributionInternal.d.ts | 2 + .../types/generator/LinearCongruential.d.ts | 2 + .../lib/types/generator/MersenneTwister.d.ts | 2 + .../lib/types/generator/RandomGenerator.d.ts | 11 + .../lib/types/generator/XorShift.d.ts | 2 + .../lib/types/generator/XoroShiro.d.ts | 2 + .../lib/types/pure-rand-default.d.ts | 16 + .../pure-rand/lib/types/pure-rand.d.ts | 3 + node_modules/pure-rand/package.json | 80 + node_modules/qs/.editorconfig | 30 - node_modules/qs/.eslintignore | 1 - node_modules/qs/.eslintrc | 19 - node_modules/qs/CHANGELOG.md | 226 - node_modules/qs/LICENSE | 28 - node_modules/qs/README.md | 475 - node_modules/qs/dist/qs.js | 638 - node_modules/qs/lib/formats.js | 18 - node_modules/qs/lib/index.js | 11 - node_modules/qs/lib/parse.js | 174 - node_modules/qs/lib/stringify.js | 210 - node_modules/qs/lib/utils.js | 213 - node_modules/qs/package.json | 80 - node_modules/qs/test/.eslintrc | 15 - node_modules/qs/test/index.js | 7 - node_modules/qs/test/parse.js | 574 - node_modules/qs/test/stringify.js | 597 - node_modules/qs/test/utils.js | 34 - node_modules/react-is/build-info.json | 8 - .../react-is/cjs/react-is.development.js | 97 +- .../react-is/cjs/react-is.production.min.js | 14 +- node_modules/react-is/package.json | 54 +- .../react-is/umd/react-is.development.js | 97 +- .../react-is/umd/react-is.production.min.js | 13 +- node_modules/read-pkg-up/index.d.ts | 87 - node_modules/read-pkg-up/index.js | 30 - node_modules/read-pkg-up/license | 9 - node_modules/read-pkg-up/package.json | 91 - node_modules/read-pkg-up/readme.md | 77 - node_modules/read-pkg/index.d.ts | 67 - node_modules/read-pkg/index.js | 41 - node_modules/read-pkg/license | 9 - .../node_modules/type-fest/index.d.ts | 15 - .../read-pkg/node_modules/type-fest/license | 9 - .../node_modules/type-fest/package.json | 83 - .../read-pkg/node_modules/type-fest/readme.md | 119 - .../node_modules/type-fest/source/basic.d.ts | 67 - .../node_modules/type-fest/source/except.d.ts | 22 - .../type-fest/source/literal-union.d.ts | 33 - .../type-fest/source/merge-exclusive.d.ts | 39 - .../node_modules/type-fest/source/merge.d.ts | 22 - .../type-fest/source/mutable.d.ts | 22 - .../type-fest/source/package-json.d.ts | 501 - .../type-fest/source/promisable.d.ts | 23 - .../type-fest/source/readonly-deep.d.ts | 59 - .../source/require-at-least-one.d.ts | 32 - node_modules/read-pkg/package.json | 81 - node_modules/read-pkg/readme.md | 81 - node_modules/regex-not/LICENSE | 21 - node_modules/regex-not/README.md | 133 - node_modules/regex-not/index.js | 72 - node_modules/regex-not/package.json | 98 - .../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 | 99 - node_modules/repeat-element/index.js | 18 - node_modules/repeat-element/package.json | 80 - 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 | 129 - node_modules/request-promise-core/LICENSE | 15 - node_modules/request-promise-core/README.md | 130 - .../configure/request-next.js | 67 - .../configure/request2.js | 74 - node_modules/request-promise-core/errors.js | 3 - .../request-promise-core/lib/errors.js | 62 - .../request-promise-core/lib/plumbing.js | 167 - .../request-promise-core/package.json | 88 - node_modules/request-promise-native/LICENSE | 15 - node_modules/request-promise-native/README.md | 91 - node_modules/request-promise-native/errors.js | 3 - node_modules/request-promise-native/lib/rp.js | 26 - .../node_modules/tough-cookie/LICENSE | 12 - .../node_modules/tough-cookie/README.md | 527 - .../node_modules/tough-cookie/lib/cookie.js | 1482 - .../node_modules/tough-cookie/lib/memstore.js | 181 - .../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 | 75 - .../node_modules/tough-cookie/lib/version.js | 2 - .../node_modules/tough-cookie/package.json | 96 - .../request-promise-native/package.json | 89 - node_modules/request/CHANGELOG.md | 717 - node_modules/request/LICENSE | 55 - node_modules/request/README.md | 1133 - node_modules/request/index.js | 155 - node_modules/request/lib/auth.js | 167 - node_modules/request/lib/cookies.js | 38 - node_modules/request/lib/getProxyFromURI.js | 79 - node_modules/request/lib/har.js | 205 - node_modules/request/lib/hawk.js | 89 - node_modules/request/lib/helpers.js | 66 - node_modules/request/lib/multipart.js | 112 - node_modules/request/lib/oauth.js | 148 - node_modules/request/lib/querystring.js | 50 - node_modules/request/lib/redirect.js | 154 - node_modules/request/lib/tunnel.js | 175 - node_modules/request/node_modules/.bin/uuid | 1 - .../request/node_modules/tough-cookie/LICENSE | 12 - .../node_modules/tough-cookie/README.md | 527 - .../node_modules/tough-cookie/lib/cookie.js | 1482 - .../node_modules/tough-cookie/lib/memstore.js | 181 - .../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 | 75 - .../node_modules/tough-cookie/lib/version.js | 2 - .../node_modules/tough-cookie/package.json | 96 - .../request/node_modules/uuid/AUTHORS | 5 - .../request/node_modules/uuid/CHANGELOG.md | 119 - .../request/node_modules/uuid/LICENSE.md | 21 - .../request/node_modules/uuid/README.md | 276 - .../request/node_modules/uuid/bin/uuid | 65 - .../request/node_modules/uuid/index.js | 8 - .../node_modules/uuid/lib/bytesToUuid.js | 26 - .../node_modules/uuid/lib/md5-browser.js | 216 - .../request/node_modules/uuid/lib/md5.js | 25 - .../node_modules/uuid/lib/rng-browser.js | 34 - .../request/node_modules/uuid/lib/rng.js | 8 - .../node_modules/uuid/lib/sha1-browser.js | 89 - .../request/node_modules/uuid/lib/sha1.js | 25 - .../request/node_modules/uuid/lib/v35.js | 57 - .../request/node_modules/uuid/package.json | 100 - node_modules/request/node_modules/uuid/v1.js | 109 - node_modules/request/node_modules/uuid/v3.js | 4 - node_modules/request/node_modules/uuid/v4.js | 29 - node_modules/request/node_modules/uuid/v5.js | 3 - node_modules/request/package.json | 118 - node_modules/request/request.js | 1553 -- node_modules/require-directory/package.json | 77 +- .../require-main-filename/CHANGELOG.md | 26 - .../require-main-filename/LICENSE.txt | 14 - node_modules/require-main-filename/README.md | 26 - node_modules/require-main-filename/index.js | 18 - .../require-main-filename/package.json | 63 - node_modules/resolve-url/.jshintrc | 44 - node_modules/resolve-url/LICENSE | 21 - node_modules/resolve-url/bower.json | 15 - node_modules/resolve-url/changelog.md | 15 - node_modules/resolve-url/component.json | 15 - node_modules/resolve-url/package.json | 68 - node_modules/resolve-url/readme.md | 83 - node_modules/resolve-url/resolve-url.js | 47 - node_modules/resolve-url/test/resolve-url.js | 70 - node_modules/resolve.exports/dist/index.js | 1 + node_modules/resolve.exports/dist/index.mjs | 1 + node_modules/resolve.exports/index.d.ts | 100 + node_modules/resolve.exports/license | 21 + node_modules/resolve.exports/package.json | 50 + node_modules/resolve.exports/readme.md | 458 + node_modules/resolve/.eslintignore | 1 - node_modules/resolve/.eslintrc | 42 +- node_modules/resolve/.github/FUNDING.yml | 12 + node_modules/resolve/appveyor.yml | 74 - node_modules/resolve/async.js | 3 + node_modules/resolve/bin/resolve | 50 + node_modules/resolve/lib/async.js | 13 +- node_modules/resolve/lib/core.js | 47 +- node_modules/resolve/lib/core.json | 104 +- node_modules/resolve/lib/homedir.js | 24 + .../resolve/lib/node-modules-paths.js | 2 +- node_modules/resolve/lib/sync.js | 21 +- node_modules/resolve/package.json | 148 +- node_modules/resolve/readme.markdown | 48 +- node_modules/resolve/sync.js | 3 + node_modules/resolve/test/.eslintrc | 5 - node_modules/resolve/test/core.js | 9 +- node_modules/resolve/test/home_paths.js | 127 + node_modules/resolve/test/home_paths_sync.js | 114 + node_modules/resolve/test/mock_sync.js | 6 +- node_modules/resolve/test/node_path.js | 2 +- node_modules/resolve/test/resolver.js | 151 +- .../test/resolver/false_main/index.js} | 0 .../test/resolver/false_main/package.json | 4 + .../test/resolver/invalid_main/package.json | 2 +- .../resolver/malformed_package_json/index.js} | 0 .../malformed_package_json/package.json | 1 + node_modules/resolve/test/resolver_sync.js | 414 +- node_modules/ret/LICENSE | 19 - node_modules/ret/README.md | 183 - node_modules/ret/lib/index.js | 282 - node_modules/ret/lib/positions.js | 17 - node_modules/ret/lib/sets.js | 82 - node_modules/ret/lib/types.js | 10 - node_modules/ret/lib/util.js | 111 - node_modules/ret/package.json | 67 - node_modules/rsvp/CHANGELOG.md | 337 - node_modules/rsvp/LICENSE | 19 - node_modules/rsvp/README.md | 371 - node_modules/rsvp/dist/es6/rsvp.es.js | 2474 -- node_modules/rsvp/dist/es6/rsvp.es.map | 1 - node_modules/rsvp/dist/rsvp.es.js | 2526 -- node_modules/rsvp/dist/rsvp.es.map | 1 - node_modules/rsvp/dist/rsvp.js | 2559 -- node_modules/rsvp/dist/rsvp.map | 1 - node_modules/rsvp/lib/rsvp.js | 93 - node_modules/rsvp/lib/rsvp/-internal.js | 224 - node_modules/rsvp/lib/rsvp/all-settled.js | 81 - node_modules/rsvp/lib/rsvp/all.js | 16 - node_modules/rsvp/lib/rsvp/asap.js | 106 - node_modules/rsvp/lib/rsvp/config.js | 20 - node_modules/rsvp/lib/rsvp/defer.js | 46 - node_modules/rsvp/lib/rsvp/enumerator.js | 136 - node_modules/rsvp/lib/rsvp/events.js | 205 - node_modules/rsvp/lib/rsvp/filter.js | 145 - node_modules/rsvp/lib/rsvp/hash-settled.js | 134 - node_modules/rsvp/lib/rsvp/hash.js | 102 - node_modules/rsvp/lib/rsvp/instrument.js | 39 - node_modules/rsvp/lib/rsvp/map.js | 132 - node_modules/rsvp/lib/rsvp/node.js | 245 - node_modules/rsvp/lib/rsvp/promise-hash.js | 34 - node_modules/rsvp/lib/rsvp/promise.js | 444 - node_modules/rsvp/lib/rsvp/promise/all.js | 59 - node_modules/rsvp/lib/rsvp/promise/race.js | 102 - node_modules/rsvp/lib/rsvp/promise/reject.js | 52 - node_modules/rsvp/lib/rsvp/promise/resolve.js | 54 - node_modules/rsvp/lib/rsvp/race.js | 16 - node_modules/rsvp/lib/rsvp/reject.js | 17 - node_modules/rsvp/lib/rsvp/resolve.js | 18 - node_modules/rsvp/lib/rsvp/rethrow.js | 49 - node_modules/rsvp/lib/rsvp/then.js | 36 - node_modules/rsvp/package.json | 101 - node_modules/safe-buffer/LICENSE | 21 - node_modules/safe-buffer/README.md | 584 - node_modules/safe-buffer/index.d.ts | 187 - node_modules/safe-buffer/index.js | 62 - node_modules/safe-buffer/package.json | 64 - node_modules/safe-regex/.travis.yml | 4 - node_modules/safe-regex/LICENSE | 18 - node_modules/safe-regex/example/safe.js | 3 - node_modules/safe-regex/index.js | 43 - node_modules/safe-regex/package.json | 74 - node_modules/safe-regex/readme.markdown | 65 - node_modules/safe-regex/test/regex.js | 50 - 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/sane/README.md | 149 - node_modules/sane/index.js | 40 - .../sane/node_modules/anymatch/LICENSE | 15 - .../sane/node_modules/anymatch/README.md | 99 - .../sane/node_modules/anymatch/index.js | 67 - .../sane/node_modules/anymatch/package.json | 72 - node_modules/sane/node_modules/braces/LICENSE | 21 - .../sane/node_modules/braces/README.md | 640 - .../sane/node_modules/braces/index.js | 318 - .../sane/node_modules/braces/lib/braces.js | 104 - .../sane/node_modules/braces/lib/compilers.js | 282 - .../sane/node_modules/braces/lib/parsers.js | 360 - .../sane/node_modules/braces/lib/utils.js | 343 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../sane/node_modules/braces/package.json | 156 - .../sane/node_modules/fill-range/LICENSE | 21 - .../sane/node_modules/fill-range/README.md | 250 - .../sane/node_modules/fill-range/index.js | 208 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../sane/node_modules/fill-range/package.json | 130 - .../sane/node_modules/is-number/LICENSE | 21 - .../sane/node_modules/is-number/README.md | 115 - .../sane/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 - .../sane/node_modules/is-number/package.json | 124 - .../sane/node_modules/micromatch/CHANGELOG.md | 37 - .../sane/node_modules/micromatch/LICENSE | 21 - .../sane/node_modules/micromatch/README.md | 1150 - .../sane/node_modules/micromatch/index.js | 877 - .../sane/node_modules/micromatch/lib/cache.js | 1 - .../node_modules/micromatch/lib/compilers.js | 77 - .../node_modules/micromatch/lib/parsers.js | 83 - .../sane/node_modules/micromatch/lib/utils.js | 309 - .../sane/node_modules/micromatch/package.json | 217 - .../sane/node_modules/normalize-path/LICENSE | 21 - .../node_modules/normalize-path/README.md | 92 - .../sane/node_modules/normalize-path/index.js | 19 - .../node_modules/normalize-path/package.json | 117 - .../sane/node_modules/to-regex-range/LICENSE | 21 - .../node_modules/to-regex-range/README.md | 281 - .../sane/node_modules/to-regex-range/index.js | 294 - .../node_modules/to-regex-range/package.json | 117 - node_modules/sane/package.json | 106 - node_modules/sane/src/cli.js | 76 - node_modules/sane/src/node_watcher.js | 398 - node_modules/sane/src/poll_watcher.js | 117 - .../sane/src/utils/recrawl-warning-dedupe.js | 51 - node_modules/sane/src/watchexec_client.js | 63 - node_modules/sane/src/watchexec_watcher.js | 116 - node_modules/sane/src/watchman_client.js | 525 - node_modules/sane/src/watchman_watcher.js | 249 - node_modules/saxes/README.md | 323 - node_modules/saxes/package.json | 105 - node_modules/saxes/saxes.d.ts | 635 - node_modules/saxes/saxes.js | 2064 -- node_modules/saxes/saxes.js.map | 1 - node_modules/set-blocking/CHANGELOG.md | 26 - node_modules/set-blocking/LICENSE.txt | 14 - node_modules/set-blocking/README.md | 31 - node_modules/set-blocking/index.js | 7 - node_modules/set-blocking/package.json | 70 - node_modules/set-value/LICENSE | 21 - node_modules/set-value/README.md | 150 - node_modules/set-value/index.js | 55 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../node_modules/is-plain-object/LICENSE | 21 - .../node_modules/is-plain-object/README.md | 104 - .../node_modules/is-plain-object/index.d.ts | 5 - .../node_modules/is-plain-object/index.js | 37 - .../node_modules/is-plain-object/package.json | 121 - node_modules/set-value/package.json | 122 - node_modules/shellwords/LICENSE | 19 - node_modules/shellwords/README.md | 19 - node_modules/shellwords/lib/shellwords.js | 57 - node_modules/shellwords/package.json | 56 - node_modules/signal-exit/CHANGELOG.md | 35 - node_modules/signal-exit/README.md | 2 +- node_modules/signal-exit/index.js | 299 +- node_modules/signal-exit/package.json | 78 +- node_modules/snapdragon-node/LICENSE | 21 - node_modules/snapdragon-node/README.md | 453 - node_modules/snapdragon-node/index.js | 492 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 93 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 110 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 109 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 114 - node_modules/snapdragon-node/package.json | 109 - node_modules/snapdragon-util/LICENSE | 21 - node_modules/snapdragon-util/README.md | 807 - node_modules/snapdragon-util/index.js | 1019 - .../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 | 139 - node_modules/snapdragon-util/package.json | 98 - node_modules/snapdragon/LICENSE | 21 - node_modules/snapdragon/README.md | 321 - node_modules/snapdragon/index.js | 174 - node_modules/snapdragon/lib/compiler.js | 177 - node_modules/snapdragon/lib/parser.js | 533 - node_modules/snapdragon/lib/position.js | 14 - node_modules/snapdragon/lib/source-maps.js | 145 - node_modules/snapdragon/lib/utils.js | 48 - .../node_modules/debug/.coveralls.yml | 1 - .../snapdragon/node_modules/debug/.eslintrc | 11 - .../snapdragon/node_modules/debug/.npmignore | 9 - .../snapdragon/node_modules/debug/.travis.yml | 14 - .../node_modules/debug/CHANGELOG.md | 362 - .../snapdragon/node_modules/debug/LICENSE | 19 - .../snapdragon/node_modules/debug/Makefile | 50 - .../snapdragon/node_modules/debug/README.md | 312 - .../node_modules/debug/component.json | 19 - .../node_modules/debug/karma.conf.js | 70 - .../snapdragon/node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 88 - .../node_modules/debug/src/browser.js | 185 - .../node_modules/debug/src/debug.js | 202 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/inspector-log.js | 15 - .../snapdragon/node_modules/debug/src/node.js | 248 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 82 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 87 - .../snapdragon/node_modules/ms/index.js | 152 - .../snapdragon/node_modules/ms/license.md | 21 - .../snapdragon/node_modules/ms/package.json | 69 - .../snapdragon/node_modules/ms/readme.md | 51 - .../node_modules/source-map/CHANGELOG.md | 301 - .../node_modules/source-map/LICENSE | 28 - .../node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 --- .../source-map/dist/source-map.js | 3090 --- .../source-map/dist/source-map.min.js | 2 - .../source-map/dist/source-map.min.js.map | 1 - .../node_modules/source-map/lib/array-set.js | 121 - .../node_modules/source-map/lib/base64-vlq.js | 140 - .../node_modules/source-map/lib/base64.js | 67 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../node_modules/source-map/lib/util.js | 417 - .../node_modules/source-map/package.json | 211 - .../node_modules/source-map/source-map.js | 8 - node_modules/snapdragon/package.json | 126 - node_modules/source-map-resolve/LICENSE | 22 - node_modules/source-map-resolve/changelog.md | 108 - .../lib/decode-uri-component.js | 8 - .../source-map-resolve/lib/resolve-url.js | 9 - .../lib/source-map-resolve-node.js | 342 - node_modules/source-map-resolve/package.json | 81 - node_modules/source-map-resolve/readme.md | 231 - .../source-map-resolve/source-map-resolve.js | 348 - .../browser-source-map-support.js | 111 +- node_modules/source-map-support/package.json | 52 +- .../source-map-support/source-map-support.js | 63 +- node_modules/source-map-url/LICENSE | 21 - node_modules/source-map-url/changelog.md | 57 - node_modules/source-map-url/package.json | 73 - node_modules/source-map-url/readme.md | 97 - node_modules/source-map-url/source-map-url.js | 57 - node_modules/spdx-correct/README.md | 14 - node_modules/spdx-correct/index.js | 364 - node_modules/spdx-correct/package.json | 88 - node_modules/spdx-exceptions/README.md | 36 - node_modules/spdx-exceptions/index.json | 40 - node_modules/spdx-exceptions/package.json | 55 - node_modules/spdx-expression-parse/AUTHORS | 4 - node_modules/spdx-expression-parse/LICENSE | 22 - node_modules/spdx-expression-parse/README.md | 91 - node_modules/spdx-expression-parse/index.js | 8 - .../spdx-expression-parse/package.json | 96 - node_modules/spdx-expression-parse/parse.js | 138 - node_modules/spdx-expression-parse/scan.js | 131 - node_modules/spdx-license-ids/README.md | 52 - node_modules/spdx-license-ids/deprecated.json | 26 - node_modules/spdx-license-ids/index.json | 420 - node_modules/spdx-license-ids/package.json | 76 - node_modules/split-string/LICENSE | 21 - node_modules/split-string/README.md | 321 - node_modules/split-string/index.js | 171 - node_modules/split-string/package.json | 103 - node_modules/sshpk/.npmignore | 9 - node_modules/sshpk/.travis.yml | 11 - node_modules/sshpk/LICENSE | 18 - node_modules/sshpk/README.md | 804 - node_modules/sshpk/bin/sshpk-conv | 243 - node_modules/sshpk/bin/sshpk-sign | 191 - node_modules/sshpk/bin/sshpk-verify | 167 - node_modules/sshpk/lib/algs.js | 168 - node_modules/sshpk/lib/certificate.js | 410 - node_modules/sshpk/lib/dhe.js | 397 - node_modules/sshpk/lib/ed-compat.js | 92 - node_modules/sshpk/lib/errors.js | 84 - node_modules/sshpk/lib/fingerprint.js | 220 - node_modules/sshpk/lib/formats/auto.js | 124 - node_modules/sshpk/lib/formats/dnssec.js | 287 - .../sshpk/lib/formats/openssh-cert.js | 352 - node_modules/sshpk/lib/formats/pem.js | 290 - node_modules/sshpk/lib/formats/pkcs1.js | 373 - node_modules/sshpk/lib/formats/pkcs8.js | 631 - node_modules/sshpk/lib/formats/putty.js | 99 - node_modules/sshpk/lib/formats/rfc4253.js | 166 - node_modules/sshpk/lib/formats/ssh-private.js | 262 - node_modules/sshpk/lib/formats/ssh.js | 115 - node_modules/sshpk/lib/formats/x509-pem.js | 88 - node_modules/sshpk/lib/formats/x509.js | 752 - node_modules/sshpk/lib/identity.js | 373 - node_modules/sshpk/lib/index.js | 40 - node_modules/sshpk/lib/key.js | 294 - node_modules/sshpk/lib/private-key.js | 246 - node_modules/sshpk/lib/signature.js | 314 - node_modules/sshpk/lib/ssh-buffer.js | 149 - node_modules/sshpk/lib/utils.js | 404 - node_modules/sshpk/man/man1/sshpk-conv.1 | 135 - node_modules/sshpk/man/man1/sshpk-sign.1 | 81 - node_modules/sshpk/man/man1/sshpk-verify.1 | 68 - node_modules/sshpk/package.json | 96 - node_modules/stack-utils/LICENSE.md | 21 + node_modules/stack-utils/index.js | 16 +- node_modules/stack-utils/license | 21 - node_modules/stack-utils/package.json | 72 +- node_modules/static-extend/LICENSE | 21 - node_modules/static-extend/index.js | 90 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 82 - node_modules/static-extend/package.json | 96 - node_modules/stealthy-require/.npmignore | 13 - node_modules/stealthy-require/LICENSE | 15 - node_modules/stealthy-require/README.md | 192 - node_modules/stealthy-require/lib/index.js | 81 - node_modules/stealthy-require/package.json | 77 - node_modules/string-width/package.json | 143 +- node_modules/strip-ansi/package.json | 141 +- node_modules/strip-eof/index.js | 15 - node_modules/strip-eof/license | 21 - node_modules/strip-eof/package.json | 71 - node_modules/strip-eof/readme.md | 28 - node_modules/supports-hyperlinks/browser.js | 8 - node_modules/supports-hyperlinks/index.js | 91 - node_modules/supports-hyperlinks/license | 9 - .../node_modules/has-flag/index.d.ts | 39 - .../node_modules/has-flag/index.js | 8 - .../node_modules/has-flag/license | 9 - .../node_modules/has-flag/package.json | 79 - .../node_modules/has-flag/readme.md | 89 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 135 - .../node_modules/supports-color/license | 9 - .../node_modules/supports-color/package.json | 85 - .../node_modules/supports-color/readme.md | 76 - node_modules/supports-hyperlinks/package.json | 80 - node_modules/supports-hyperlinks/readme.md | 48 - .../supports-preserve-symlinks-flag/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + .../supports-preserve-symlinks-flag/.nycrc | 9 + .../CHANGELOG.md | 22 + .../supports-preserve-symlinks-flag/LICENSE | 21 + .../supports-preserve-symlinks-flag/README.md | 42 + .../browser.js | 3 + .../supports-preserve-symlinks-flag/index.js | 9 + .../package.json | 70 + .../test/index.js | 29 + node_modules/symbol-tree/LICENSE | 21 - node_modules/symbol-tree/README.md | 545 - node_modules/symbol-tree/lib/SymbolTree.js | 838 - .../symbol-tree/lib/SymbolTreeNode.js | 54 - node_modules/symbol-tree/lib/TreeIterator.js | 69 - node_modules/symbol-tree/lib/TreePosition.js | 11 - node_modules/symbol-tree/package.json | 75 - node_modules/terminal-link/index.d.ts | 69 - node_modules/terminal-link/index.js | 23 - node_modules/terminal-link/license | 9 - node_modules/terminal-link/package.json | 76 - node_modules/terminal-link/readme.md | 82 - node_modules/throat/LICENSE | 19 - node_modules/throat/README.md | 59 - node_modules/throat/index.d.ts | 32 - node_modules/throat/index.js | 118 - node_modules/throat/index.js.flow | 7 - node_modules/throat/package.json | 80 - node_modules/tmpl/.travis.yml | 3 - node_modules/tmpl/lib/tmpl.js | 2 +- node_modules/tmpl/package.json | 47 +- node_modules/to-fast-properties/package.json | 54 +- node_modules/to-object-path/LICENSE | 21 - node_modules/to-object-path/README.md | 71 - node_modules/to-object-path/index.js | 33 - .../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 | 139 - node_modules/to-object-path/package.json | 81 - node_modules/to-regex/LICENSE | 21 - node_modules/to-regex/README.md | 205 - node_modules/to-regex/index.js | 155 - node_modules/to-regex/package.json | 97 - node_modules/tough-cookie/LICENSE | 12 - node_modules/tough-cookie/README.md | 582 - node_modules/tough-cookie/lib/cookie.js | 1671 -- node_modules/tough-cookie/lib/memstore.js | 190 - node_modules/tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 70 - .../tough-cookie/lib/pubsuffix-psl.js | 38 - node_modules/tough-cookie/lib/store.js | 76 - node_modules/tough-cookie/lib/version.js | 2 - node_modules/tough-cookie/package.json | 121 - node_modules/tr46/LICENSE.md | 21 - node_modules/tr46/README.md | 72 - node_modules/tr46/index.js | 297 - node_modules/tr46/lib/mappingTable.json | 1 - node_modules/tr46/lib/regexes.js | 29 - node_modules/tr46/lib/statusMapping.js | 11 - node_modules/tr46/package.json | 85 - node_modules/tunnel-agent/LICENSE | 55 - node_modules/tunnel-agent/README.md | 4 - node_modules/tunnel-agent/index.js | 244 - node_modules/tunnel-agent/package.json | 55 - node_modules/tweetnacl/.npmignore | 4 - node_modules/tweetnacl/AUTHORS.md | 28 - node_modules/tweetnacl/CHANGELOG.md | 221 - node_modules/tweetnacl/LICENSE | 24 - .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 - node_modules/tweetnacl/README.md | 459 - node_modules/tweetnacl/nacl-fast.js | 2388 -- node_modules/tweetnacl/nacl-fast.min.js | 2 - node_modules/tweetnacl/nacl.d.ts | 98 - node_modules/tweetnacl/nacl.js | 1175 - node_modules/tweetnacl/nacl.min.js | 1 - node_modules/tweetnacl/package.json | 86 - node_modules/typedarray-to-buffer/.airtap.yml | 15 - node_modules/typedarray-to-buffer/.travis.yml | 11 - node_modules/typedarray-to-buffer/LICENSE | 21 - node_modules/typedarray-to-buffer/README.md | 85 - node_modules/typedarray-to-buffer/index.js | 25 - .../typedarray-to-buffer/package.json | 75 - .../typedarray-to-buffer/test/basic.js | 50 - node_modules/union-value/LICENSE | 21 - node_modules/union-value/README.md | 73 - node_modules/union-value/index.js | 30 - node_modules/union-value/package.json | 101 - node_modules/universalify/LICENSE | 20 - node_modules/universalify/README.md | 76 - node_modules/universalify/index.js | 25 - node_modules/universalify/package.json | 64 - node_modules/unset-value/LICENSE | 21 - node_modules/unset-value/README.md | 131 - node_modules/unset-value/index.js | 32 - .../node_modules/has-value/LICENSE | 21 - .../node_modules/has-value/README.md | 130 - .../node_modules/has-value/index.js | 19 - .../has-value/node_modules/isobject/LICENSE | 21 - .../has-value/node_modules/isobject/README.md | 112 - .../has-value/node_modules/isobject/index.js | 14 - .../node_modules/isobject/package.json | 98 - .../node_modules/has-value/package.json | 114 - .../node_modules/has-values/LICENSE | 21 - .../node_modules/has-values/README.md | 114 - .../node_modules/has-values/index.js | 36 - .../node_modules/has-values/package.json | 106 - node_modules/unset-value/package.json | 112 - node_modules/update-browserslist-db/LICENSE | 20 + node_modules/update-browserslist-db/README.md | 22 + .../check-npm-version.js | 16 + node_modules/update-browserslist-db/cli.js | 42 + .../update-browserslist-db/index.d.ts | 6 + node_modules/update-browserslist-db/index.js | 317 + .../update-browserslist-db/package.json | 40 + node_modules/update-browserslist-db/utils.js | 22 + node_modules/urix/.jshintrc | 42 - node_modules/urix/LICENSE | 21 - node_modules/urix/index.js | 17 - node_modules/urix/package.json | 59 - node_modules/urix/readme.md | 46 - node_modules/urix/test/index.js | 43 - node_modules/use/LICENSE | 21 - node_modules/use/README.md | 90 - node_modules/use/index.js | 155 - node_modules/use/package.json | 108 - node_modules/uuid/CHANGELOG.md | 229 - node_modules/uuid/CONTRIBUTING.md | 18 - node_modules/uuid/LICENSE.md | 9 - node_modules/uuid/README.md | 505 - node_modules/uuid/dist/bin/uuid | 2 - node_modules/uuid/dist/esm-browser/index.js | 9 - node_modules/uuid/dist/esm-browser/md5.js | 215 - node_modules/uuid/dist/esm-browser/nil.js | 1 - node_modules/uuid/dist/esm-browser/parse.js | 35 - node_modules/uuid/dist/esm-browser/regex.js | 1 - node_modules/uuid/dist/esm-browser/rng.js | 19 - node_modules/uuid/dist/esm-browser/sha1.js | 96 - .../uuid/dist/esm-browser/stringify.js | 30 - node_modules/uuid/dist/esm-browser/v1.js | 95 - node_modules/uuid/dist/esm-browser/v3.js | 4 - node_modules/uuid/dist/esm-browser/v35.js | 64 - node_modules/uuid/dist/esm-browser/v4.js | 24 - node_modules/uuid/dist/esm-browser/v5.js | 4 - .../uuid/dist/esm-browser/validate.js | 7 - node_modules/uuid/dist/esm-browser/version.js | 11 - node_modules/uuid/dist/esm-node/index.js | 9 - node_modules/uuid/dist/esm-node/md5.js | 13 - node_modules/uuid/dist/esm-node/nil.js | 1 - node_modules/uuid/dist/esm-node/parse.js | 35 - node_modules/uuid/dist/esm-node/regex.js | 1 - node_modules/uuid/dist/esm-node/rng.js | 12 - node_modules/uuid/dist/esm-node/sha1.js | 13 - node_modules/uuid/dist/esm-node/stringify.js | 29 - node_modules/uuid/dist/esm-node/v1.js | 95 - node_modules/uuid/dist/esm-node/v3.js | 4 - node_modules/uuid/dist/esm-node/v35.js | 64 - node_modules/uuid/dist/esm-node/v4.js | 24 - node_modules/uuid/dist/esm-node/v5.js | 4 - node_modules/uuid/dist/esm-node/validate.js | 7 - node_modules/uuid/dist/esm-node/version.js | 11 - node_modules/uuid/dist/index.js | 79 - node_modules/uuid/dist/md5-browser.js | 223 - node_modules/uuid/dist/md5.js | 23 - node_modules/uuid/dist/nil.js | 8 - node_modules/uuid/dist/parse.js | 45 - node_modules/uuid/dist/regex.js | 8 - node_modules/uuid/dist/rng-browser.js | 26 - node_modules/uuid/dist/rng.js | 24 - node_modules/uuid/dist/sha1-browser.js | 104 - node_modules/uuid/dist/sha1.js | 23 - node_modules/uuid/dist/stringify.js | 39 - node_modules/uuid/dist/umd/uuid.min.js | 1 - node_modules/uuid/dist/umd/uuidNIL.min.js | 1 - node_modules/uuid/dist/umd/uuidParse.min.js | 1 - .../uuid/dist/umd/uuidStringify.min.js | 1 - .../uuid/dist/umd/uuidValidate.min.js | 1 - node_modules/uuid/dist/umd/uuidVersion.min.js | 1 - node_modules/uuid/dist/umd/uuidv1.min.js | 1 - node_modules/uuid/dist/umd/uuidv3.min.js | 1 - node_modules/uuid/dist/umd/uuidv4.min.js | 1 - node_modules/uuid/dist/umd/uuidv5.min.js | 1 - node_modules/uuid/dist/uuid-bin.js | 85 - node_modules/uuid/dist/v1.js | 107 - node_modules/uuid/dist/v3.js | 16 - node_modules/uuid/dist/v35.js | 78 - node_modules/uuid/dist/v4.js | 37 - node_modules/uuid/dist/v5.js | 16 - node_modules/uuid/dist/validate.js | 17 - node_modules/uuid/dist/version.js | 21 - node_modules/uuid/package.json | 164 - node_modules/uuid/wrapper.mjs | 10 - node_modules/v8-to-istanbul/CHANGELOG.md | 63 + node_modules/v8-to-istanbul/README.md | 2 +- node_modules/v8-to-istanbul/index.d.ts | 5 +- node_modules/v8-to-istanbul/lib/range.js | 35 + node_modules/v8-to-istanbul/lib/source.js | 42 +- .../v8-to-istanbul/lib/v8-to-istanbul.js | 69 +- .../node_modules/convert-source-map/LICENSE | 23 + .../node_modules/convert-source-map/README.md | 123 + .../node_modules/convert-source-map/index.js | 179 + .../convert-source-map/package.json | 41 + .../node_modules/source-map/CHANGELOG.md | 344 - .../node_modules/source-map/LICENSE | 28 - .../node_modules/source-map/README.md | 822 - .../source-map/dist/source-map.js | 3351 --- .../node_modules/source-map/lib/array-set.js | 100 - .../node_modules/source-map/lib/base64-vlq.js | 111 - .../node_modules/source-map/lib/base64.js | 18 - .../source-map/lib/binary-search.js | 107 - .../source-map/lib/mapping-list.js | 80 - .../node_modules/source-map/lib/mappings.wasm | Bin 48693 -> 0 bytes .../node_modules/source-map/lib/read-wasm.js | 40 - .../source-map/lib/source-map-consumer.js | 1254 - .../source-map/lib/source-map-generator.js | 413 - .../source-map/lib/source-node.js | 404 - .../node_modules/source-map/lib/util.js | 546 - .../node_modules/source-map/lib/wasm.js | 107 - .../node_modules/source-map/package.json | 229 - .../node_modules/source-map/source-map.d.ts | 369 - .../node_modules/source-map/source-map.js | 8 - node_modules/v8-to-istanbul/package.json | 94 +- .../validate-npm-package-license/LICENSE | 202 - .../validate-npm-package-license/README.md | 113 - .../validate-npm-package-license/index.js | 86 - .../validate-npm-package-license/package.json | 67 - node_modules/verror/.npmignore | 9 - node_modules/verror/CHANGES.md | 28 - node_modules/verror/CONTRIBUTING.md | 19 - node_modules/verror/LICENSE | 19 - node_modules/verror/README.md | 528 - node_modules/verror/lib/verror.js | 451 - node_modules/verror/package.json | 51 - node_modules/w3c-hr-time/CHANGELOG.md | 19 - node_modules/w3c-hr-time/LICENSE.md | 21 - node_modules/w3c-hr-time/README.md | 130 - node_modules/w3c-hr-time/index.js | 11 - .../w3c-hr-time/lib/calculate-clock-offset.js | 39 - .../w3c-hr-time/lib/clock-is-accurate.js | 61 - .../w3c-hr-time/lib/global-monotonic-clock.js | 10 - node_modules/w3c-hr-time/lib/performance.js | 53 - node_modules/w3c-hr-time/lib/utils.js | 11 - node_modules/w3c-hr-time/package.json | 61 - node_modules/w3c-xmlserializer/LICENSE.md | 25 - node_modules/w3c-xmlserializer/README.md | 41 - .../w3c-xmlserializer/lib/attributes.js | 128 - .../w3c-xmlserializer/lib/constants.js | 44 - .../w3c-xmlserializer/lib/serialize.js | 371 - node_modules/w3c-xmlserializer/package.json | 64 - node_modules/walker/package.json | 54 +- node_modules/webidl-conversions/LICENSE.md | 12 - node_modules/webidl-conversions/README.md | 101 - node_modules/webidl-conversions/lib/index.js | 489 - node_modules/webidl-conversions/package.json | 67 - node_modules/whatwg-encoding/LICENSE.txt | 7 - node_modules/whatwg-encoding/README.md | 50 - .../whatwg-encoding/lib/labels-to-names.json | 207 - .../whatwg-encoding/lib/supported-names.json | 37 - .../whatwg-encoding/lib/whatwg-encoding.js | 47 - node_modules/whatwg-encoding/package.json | 66 - node_modules/whatwg-mimetype/LICENSE.txt | 7 - node_modules/whatwg-mimetype/README.md | 101 - node_modules/whatwg-mimetype/lib/mime-type.js | 191 - node_modules/whatwg-mimetype/lib/parser.js | 124 - .../whatwg-mimetype/lib/serializer.js | 25 - node_modules/whatwg-mimetype/lib/utils.js | 25 - node_modules/whatwg-mimetype/package.json | 80 - node_modules/whatwg-url/LICENSE.txt | 21 - node_modules/whatwg-url/README.md | 104 - node_modules/whatwg-url/dist/Function.js | 46 - node_modules/whatwg-url/dist/URL-impl.js | 217 - node_modules/whatwg-url/dist/URL.js | 417 - .../whatwg-url/dist/URLSearchParams-impl.js | 122 - .../whatwg-url/dist/URLSearchParams.js | 457 - node_modules/whatwg-url/dist/VoidFunction.js | 30 - node_modules/whatwg-url/dist/encoding.js | 26 - node_modules/whatwg-url/dist/infra.js | 26 - .../whatwg-url/dist/percent-encoding.js | 141 - .../whatwg-url/dist/url-state-machine.js | 1207 - node_modules/whatwg-url/dist/urlencoded.js | 103 - node_modules/whatwg-url/dist/utils.js | 141 - node_modules/whatwg-url/index.js | 24 - node_modules/whatwg-url/package.json | 95 - node_modules/whatwg-url/webidl2js-wrapper.js | 7 - node_modules/which-module/CHANGELOG.md | 26 - node_modules/which-module/LICENSE | 13 - node_modules/which-module/README.md | 55 - node_modules/which-module/index.js | 9 - node_modules/which-module/package.json | 68 - node_modules/wrap-ansi/index.js | 72 +- node_modules/wrap-ansi/license | 2 +- node_modules/wrap-ansi/package.json | 151 +- node_modules/wrap-ansi/readme.md | 14 +- node_modules/write-file-atomic/CHANGELOG.md | 32 - .../write-file-atomic/{LICENSE => LICENSE.md} | 0 node_modules/write-file-atomic/README.md | 27 +- node_modules/write-file-atomic/index.js | 259 - node_modules/write-file-atomic/lib/index.js | 267 + node_modules/write-file-atomic/package.json | 104 +- node_modules/ws/LICENSE | 21 - node_modules/ws/README.md | 496 - node_modules/ws/browser.js | 8 - node_modules/ws/index.js | 10 - node_modules/ws/lib/buffer-util.js | 129 - node_modules/ws/lib/constants.js | 10 - node_modules/ws/lib/event-target.js | 184 - node_modules/ws/lib/extension.js | 223 - node_modules/ws/lib/limiter.js | 55 - node_modules/ws/lib/permessage-deflate.js | 517 - node_modules/ws/lib/receiver.js | 507 - node_modules/ws/lib/sender.js | 405 - node_modules/ws/lib/stream.js | 165 - node_modules/ws/lib/validation.js | 30 - node_modules/ws/lib/websocket-server.js | 406 - node_modules/ws/lib/websocket.js | 933 - node_modules/ws/package.json | 90 - node_modules/xml-name-validator/LICENSE.txt | 176 - node_modules/xml-name-validator/README.md | 36 - .../lib/generated-parser.js | 504 - .../xml-name-validator/lib/grammar.pegjs | 35 - .../lib/xml-name-validator.js | 17 - node_modules/xml-name-validator/package.json | 65 - node_modules/xmlchars/LICENSE | 18 - node_modules/xmlchars/README.md | 33 - node_modules/xmlchars/package.json | 86 - 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 | 105 - node_modules/xmlchars/xml/1.0/ed5.js.map | 1 - node_modules/xmlchars/xml/1.1/ed2.d.ts | 73 - node_modules/xmlchars/xml/1.1/ed2.js | 145 - node_modules/xmlchars/xml/1.1/ed2.js.map | 1 - node_modules/xmlchars/xmlchars.d.ts | 170 - node_modules/xmlchars/xmlchars.js | 191 - 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/y18n/CHANGELOG.md | 78 +- node_modules/y18n/README.md | 44 +- node_modules/y18n/build/index.cjs | 203 + node_modules/y18n/build/lib/cjs.js | 6 + node_modules/y18n/build/lib/index.js | 174 + .../y18n/build/lib/platform-shims/node.js | 19 + node_modules/y18n/index.js | 188 - node_modules/y18n/index.mjs | 8 + node_modules/y18n/package.json | 111 +- node_modules/yargs-parser/CHANGELOG.md | 523 +- node_modules/yargs-parser/README.md | 215 +- node_modules/yargs-parser/browser.js | 29 + node_modules/yargs-parser/build/index.cjs | 1050 + node_modules/yargs-parser/build/lib/index.js | 62 + .../yargs-parser/build/lib/string-utils.js | 65 + .../build/lib/tokenize-arg-string.js | 40 + .../build/lib/yargs-parser-types.js | 12 + .../yargs-parser/build/lib/yargs-parser.js | 1045 + node_modules/yargs-parser/index.js | 1032 - .../yargs-parser/lib/tokenize-arg-string.js | 40 - node_modules/yargs-parser/package.json | 132 +- node_modules/yargs/CHANGELOG.md | 420 - node_modules/yargs/README.md | 100 +- node_modules/yargs/browser.d.ts | 5 + node_modules/yargs/browser.mjs | 7 + node_modules/yargs/build/index.cjs | 1 + .../yargs/build/lib/apply-extends.d.ts | 2 - node_modules/yargs/build/lib/apply-extends.js | 65 - node_modules/yargs/build/lib/argsert.d.ts | 2 - node_modules/yargs/build/lib/argsert.js | 33 +- node_modules/yargs/build/lib/command.d.ts | 64 - node_modules/yargs/build/lib/command.js | 649 +- .../yargs/build/lib/common-types.d.ts | 36 - node_modules/yargs/build/lib/common-types.js | 25 - .../yargs/build/lib/completion-templates.d.ts | 2 - .../yargs/build/lib/completion-templates.js | 14 +- node_modules/yargs/build/lib/completion.d.ts | 21 - node_modules/yargs/build/lib/completion.js | 320 +- node_modules/yargs/build/lib/is-promise.d.ts | 1 - node_modules/yargs/build/lib/is-promise.js | 9 - node_modules/yargs/build/lib/levenshtein.d.ts | 1 - node_modules/yargs/build/lib/levenshtein.js | 58 - node_modules/yargs/build/lib/middleware.d.ts | 10 - node_modules/yargs/build/lib/middleware.js | 83 +- node_modules/yargs/build/lib/obj-filter.d.ts | 1 - node_modules/yargs/build/lib/obj-filter.js | 14 - .../yargs/build/lib/parse-command.d.ts | 11 - node_modules/yargs/build/lib/parse-command.js | 12 +- .../yargs/build/lib/process-argv.d.ts | 2 - node_modules/yargs/build/lib/process-argv.js | 31 - .../yargs/build/lib/typings/common-types.js | 9 + .../build/lib/typings/yargs-parser-types.js | 1 + node_modules/yargs/build/lib/usage.d.ts | 49 - node_modules/yargs/build/lib/usage.js | 386 +- .../yargs/build/lib/utils/apply-extends.js | 59 + .../yargs/build/lib/utils/is-promise.js | 5 + .../yargs/build/lib/utils/levenshtein.js | 34 + .../build/lib/utils/maybe-async-result.js | 17 + .../yargs/build/lib/utils/obj-filter.js | 10 + .../yargs/build/lib/utils/process-argv.js | 17 + .../yargs/build/lib/utils/set-blocking.js | 12 + .../yargs/build/lib/utils/which-module.js | 10 + node_modules/yargs/build/lib/validation.d.ts | 34 - node_modules/yargs/build/lib/validation.js | 233 +- node_modules/yargs/build/lib/yargs-factory.js | 1512 + node_modules/yargs/build/lib/yargs.d.ts | 274 - node_modules/yargs/build/lib/yargs.js | 1190 - node_modules/yargs/build/lib/yerror.d.ts | 4 - node_modules/yargs/build/lib/yerror.js | 10 +- node_modules/yargs/helpers/helpers.mjs | 10 + node_modules/yargs/helpers/index.js | 14 + node_modules/yargs/helpers/package.json | 3 + node_modules/yargs/index.cjs | 53 + node_modules/yargs/index.js | 40 - node_modules/yargs/index.mjs | 8 + .../yargs/lib/platform-shims/browser.mjs | 95 + node_modules/yargs/lib/platform-shims/esm.mjs | 73 + node_modules/yargs/locales/cs.json | 51 + node_modules/yargs/locales/en.json | 4 + node_modules/yargs/locales/fi.json | 2 +- node_modules/yargs/locales/ko.json | 50 +- node_modules/yargs/locales/ru.json | 7 +- node_modules/yargs/locales/uk_UA.json | 51 + node_modules/yargs/locales/uz.json | 52 + node_modules/yargs/locales/zh_TW.json | 96 +- node_modules/yargs/package.json | 172 +- node_modules/yargs/yargs | 9 + node_modules/yargs/yargs.js | 14 - node_modules/yargs/yargs.mjs | 10 + node_modules/yocto-queue/index.d.ts | 56 + node_modules/yocto-queue/index.js | 68 + .../{is-docker => yocto-queue}/license | 0 node_modules/yocto-queue/package.json | 43 + node_modules/yocto-queue/readme.md | 64 + package-lock.json | 9724 ++----- package.json | 2 +- 5621 files changed, 201673 insertions(+), 506629 deletions(-) delete mode 120000 node_modules/.bin/atob delete mode 120000 node_modules/.bin/escodegen delete mode 120000 node_modules/.bin/esgenerate delete mode 120000 node_modules/.bin/is-ci delete mode 120000 node_modules/.bin/is-docker delete mode 120000 node_modules/.bin/jest-runtime create mode 120000 node_modules/.bin/resolve delete mode 120000 node_modules/.bin/sane delete mode 120000 node_modules/.bin/sshpk-conv delete mode 120000 node_modules/.bin/sshpk-sign delete mode 120000 node_modules/.bin/sshpk-verify create mode 120000 node_modules/.bin/update-browserslist-db delete mode 120000 node_modules/.bin/uuid delete mode 120000 node_modules/.bin/watch create mode 100644 node_modules/.package-lock.json rename node_modules/{spdx-correct => @ampproject/remapping}/LICENSE (100%) create mode 100644 node_modules/@ampproject/remapping/README.md create mode 100644 node_modules/@ampproject/remapping/dist/remapping.mjs create mode 100644 node_modules/@ampproject/remapping/dist/remapping.mjs.map create mode 100644 node_modules/@ampproject/remapping/dist/remapping.umd.js create mode 100644 node_modules/@ampproject/remapping/dist/remapping.umd.js.map create mode 100644 node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts create mode 100644 node_modules/@ampproject/remapping/dist/types/remapping.d.ts create mode 100644 node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts create mode 100644 node_modules/@ampproject/remapping/dist/types/source-map.d.ts create mode 100644 node_modules/@ampproject/remapping/dist/types/types.d.ts create mode 100644 node_modules/@ampproject/remapping/package.json create mode 100644 node_modules/@babel/compat-data/README.md create mode 100644 node_modules/@babel/core/cjs-proxy.cjs create mode 100644 node_modules/@babel/core/lib/config/cache-contexts.js.map create mode 100644 node_modules/@babel/core/lib/config/caching.js.map create mode 100644 node_modules/@babel/core/lib/config/config-chain.js.map create mode 100644 node_modules/@babel/core/lib/config/config-descriptors.js.map create mode 100644 node_modules/@babel/core/lib/config/files/configuration.js.map create mode 100644 node_modules/@babel/core/lib/config/files/import-meta-resolve.js create mode 100644 node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map create mode 100644 node_modules/@babel/core/lib/config/files/import.cjs create mode 100644 node_modules/@babel/core/lib/config/files/import.cjs.map delete mode 100644 node_modules/@babel/core/lib/config/files/import.js create mode 100644 node_modules/@babel/core/lib/config/files/index-browser.js.map create mode 100644 node_modules/@babel/core/lib/config/files/index.js.map create mode 100644 node_modules/@babel/core/lib/config/files/module-types.js.map create mode 100644 node_modules/@babel/core/lib/config/files/package.js.map create mode 100644 node_modules/@babel/core/lib/config/files/plugins.js.map create mode 100644 node_modules/@babel/core/lib/config/files/types.js.map create mode 100644 node_modules/@babel/core/lib/config/files/utils.js.map create mode 100644 node_modules/@babel/core/lib/config/full.js.map create mode 100644 node_modules/@babel/core/lib/config/helpers/config-api.js.map create mode 100644 node_modules/@babel/core/lib/config/helpers/deep-array.js create mode 100644 node_modules/@babel/core/lib/config/helpers/deep-array.js.map create mode 100644 node_modules/@babel/core/lib/config/helpers/environment.js.map create mode 100644 node_modules/@babel/core/lib/config/index.js.map create mode 100644 node_modules/@babel/core/lib/config/item.js.map create mode 100644 node_modules/@babel/core/lib/config/partial.js.map create mode 100644 node_modules/@babel/core/lib/config/pattern-to-regex.js.map create mode 100644 node_modules/@babel/core/lib/config/plugin.js.map create mode 100644 node_modules/@babel/core/lib/config/printer.js.map create mode 100644 node_modules/@babel/core/lib/config/resolve-targets-browser.js.map create mode 100644 node_modules/@babel/core/lib/config/resolve-targets.js.map create mode 100644 node_modules/@babel/core/lib/config/util.js.map create mode 100644 node_modules/@babel/core/lib/config/validation/option-assertions.js.map create mode 100644 node_modules/@babel/core/lib/config/validation/options.js.map create mode 100644 node_modules/@babel/core/lib/config/validation/plugins.js.map create mode 100644 node_modules/@babel/core/lib/config/validation/removed.js.map create mode 100644 node_modules/@babel/core/lib/errors/config-error.js create mode 100644 node_modules/@babel/core/lib/errors/config-error.js.map create mode 100644 node_modules/@babel/core/lib/errors/rewrite-stack-trace.js create mode 100644 node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map create mode 100644 node_modules/@babel/core/lib/gensync-utils/async.js.map create mode 100644 node_modules/@babel/core/lib/gensync-utils/fs.js.map create mode 100644 node_modules/@babel/core/lib/gensync-utils/functional.js create mode 100644 node_modules/@babel/core/lib/gensync-utils/functional.js.map create mode 100644 node_modules/@babel/core/lib/index.js.map create mode 100644 node_modules/@babel/core/lib/parse.js.map create mode 100644 node_modules/@babel/core/lib/parser/index.js.map create mode 100644 node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map create mode 100644 node_modules/@babel/core/lib/tools/build-external-helpers.js.map create mode 100644 node_modules/@babel/core/lib/transform-ast.js.map create mode 100644 node_modules/@babel/core/lib/transform-file-browser.js.map create mode 100644 node_modules/@babel/core/lib/transform-file.js.map create mode 100644 node_modules/@babel/core/lib/transform.js.map create mode 100644 node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map create mode 100644 node_modules/@babel/core/lib/transformation/file/file.js.map create mode 100644 node_modules/@babel/core/lib/transformation/file/generate.js.map create mode 100644 node_modules/@babel/core/lib/transformation/file/merge-map.js.map create mode 100644 node_modules/@babel/core/lib/transformation/index.js.map create mode 100644 node_modules/@babel/core/lib/transformation/normalize-file.js.map create mode 100644 node_modules/@babel/core/lib/transformation/normalize-opts.js.map create mode 100644 node_modules/@babel/core/lib/transformation/plugin-pass.js.map delete mode 100644 node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js create mode 100644 node_modules/@babel/core/lib/transformation/util/clone-deep.js.map create mode 100644 node_modules/@babel/core/lib/vendor/import-meta-resolve.js create mode 100644 node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map create mode 100644 node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js.map create mode 100644 node_modules/@babel/core/node_modules/convert-source-map/LICENSE create mode 100644 node_modules/@babel/core/node_modules/convert-source-map/README.md create mode 100644 node_modules/@babel/core/node_modules/convert-source-map/index.js create mode 100644 node_modules/@babel/core/node_modules/convert-source-map/package.json delete mode 100644 node_modules/@babel/core/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/@babel/core/node_modules/source-map/LICENSE delete mode 100644 node_modules/@babel/core/node_modules/source-map/README.md delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/util.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/package.json delete mode 100644 node_modules/@babel/core/node_modules/source-map/source-map.js delete mode 100644 node_modules/@babel/core/src/config/files/index-browser.js create mode 100644 node_modules/@babel/core/src/config/files/index-browser.ts delete mode 100644 node_modules/@babel/core/src/config/files/index.js create mode 100644 node_modules/@babel/core/src/config/files/index.ts delete mode 100644 node_modules/@babel/core/src/config/resolve-targets-browser.js create mode 100644 node_modules/@babel/core/src/config/resolve-targets-browser.ts delete mode 100644 node_modules/@babel/core/src/config/resolve-targets.js create mode 100644 node_modules/@babel/core/src/config/resolve-targets.ts delete mode 100644 node_modules/@babel/core/src/transform-file-browser.js create mode 100644 node_modules/@babel/core/src/transform-file-browser.ts delete mode 100644 node_modules/@babel/core/src/transform-file.js create mode 100644 node_modules/@babel/core/src/transform-file.ts delete mode 100644 node_modules/@babel/core/src/transformation/util/clone-deep-browser.js delete mode 100644 node_modules/@babel/core/src/transformation/util/clone-deep.js create mode 100644 node_modules/@babel/generator/lib/buffer.js.map create mode 100644 node_modules/@babel/generator/lib/generators/base.js.map create mode 100644 node_modules/@babel/generator/lib/generators/classes.js.map create mode 100644 node_modules/@babel/generator/lib/generators/expressions.js.map create mode 100644 node_modules/@babel/generator/lib/generators/flow.js.map create mode 100644 node_modules/@babel/generator/lib/generators/index.js.map create mode 100644 node_modules/@babel/generator/lib/generators/jsx.js.map create mode 100644 node_modules/@babel/generator/lib/generators/methods.js.map create mode 100644 node_modules/@babel/generator/lib/generators/modules.js.map create mode 100644 node_modules/@babel/generator/lib/generators/statements.js.map create mode 100644 node_modules/@babel/generator/lib/generators/template-literals.js.map create mode 100644 node_modules/@babel/generator/lib/generators/types.js.map create mode 100644 node_modules/@babel/generator/lib/generators/typescript.js.map create mode 100644 node_modules/@babel/generator/lib/index.js.map create mode 100644 node_modules/@babel/generator/lib/node/index.js.map create mode 100644 node_modules/@babel/generator/lib/node/parentheses.js.map create mode 100644 node_modules/@babel/generator/lib/node/whitespace.js.map create mode 100644 node_modules/@babel/generator/lib/printer.js.map create mode 100644 node_modules/@babel/generator/lib/source-map.js.map delete mode 100644 node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/@babel/generator/node_modules/source-map/LICENSE delete mode 100644 node_modules/@babel/generator/node_modules/source-map/README.md delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/util.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/package.json delete mode 100644 node_modules/@babel/generator/node_modules/source-map/source-map.js create mode 100644 node_modules/@babel/helper-compilation-targets/README.md create mode 100644 node_modules/@babel/helper-compilation-targets/lib/debug.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/index.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/options.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/pretty.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/targets.js.map create mode 100644 node_modules/@babel/helper-compilation-targets/lib/utils.js.map rename node_modules/{execa/node_modules/semver => @babel/helper-compilation-targets/node_modules/lru-cache}/LICENSE (100%) create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/README.md create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/package.json rename node_modules/{execa/node_modules/which => @babel/helper-compilation-targets/node_modules/yallist}/LICENSE (100%) create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/yallist/README.md create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/yallist/package.json create mode 100644 node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js rename node_modules/@babel/{helper-get-function-arity => helper-environment-visitor}/LICENSE (100%) create mode 100644 node_modules/@babel/helper-environment-visitor/README.md create mode 100644 node_modules/@babel/helper-environment-visitor/lib/index.js create mode 100644 node_modules/@babel/helper-environment-visitor/lib/index.js.map create mode 100644 node_modules/@babel/helper-environment-visitor/package.json create mode 100644 node_modules/@babel/helper-function-name/lib/index.js.map 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 rename node_modules/@babel/{helper-member-expression-to-functions => helper-hoist-variables}/LICENSE (100%) create mode 100644 node_modules/@babel/helper-hoist-variables/README.md create mode 100644 node_modules/@babel/helper-hoist-variables/lib/index.js create mode 100644 node_modules/@babel/helper-hoist-variables/package.json delete mode 100644 node_modules/@babel/helper-member-expression-to-functions/README.md delete mode 100644 node_modules/@babel/helper-member-expression-to-functions/lib/index.js delete mode 100644 node_modules/@babel/helper-member-expression-to-functions/lib/index.js.map delete mode 100644 node_modules/@babel/helper-member-expression-to-functions/package.json create mode 100644 node_modules/@babel/helper-module-imports/lib/import-builder.js.map create mode 100644 node_modules/@babel/helper-module-imports/lib/import-injector.js.map create mode 100644 node_modules/@babel/helper-module-imports/lib/index.js.map create mode 100644 node_modules/@babel/helper-module-imports/lib/is-module.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/dynamic-import.js create mode 100644 node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/index.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map create mode 100644 node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map delete mode 100644 node_modules/@babel/helper-optimise-call-expression/README.md delete mode 100644 node_modules/@babel/helper-optimise-call-expression/lib/index.js delete mode 100644 node_modules/@babel/helper-optimise-call-expression/package.json create mode 100644 node_modules/@babel/helper-plugin-utils/lib/index.js.map delete mode 100644 node_modules/@babel/helper-replace-supers/README.md delete mode 100644 node_modules/@babel/helper-replace-supers/lib/index.js delete mode 100644 node_modules/@babel/helper-replace-supers/package.json create mode 100644 node_modules/@babel/helper-simple-access/lib/index.js.map rename node_modules/@babel/{helper-optimise-call-expression => helper-string-parser}/LICENSE (100%) create mode 100644 node_modules/@babel/helper-string-parser/README.md create mode 100644 node_modules/@babel/helper-string-parser/lib/index.js create mode 100644 node_modules/@babel/helper-string-parser/lib/index.js.map create mode 100644 node_modules/@babel/helper-string-parser/package.json create mode 100644 node_modules/@babel/helper-validator-identifier/lib/identifier.js.map create mode 100644 node_modules/@babel/helper-validator-identifier/lib/index.js.map create mode 100644 node_modules/@babel/helper-validator-identifier/lib/keyword.js.map create mode 100644 node_modules/@babel/helper-validator-option/lib/find-suggestion.js.map create mode 100644 node_modules/@babel/helper-validator-option/lib/index.js.map create mode 100644 node_modules/@babel/helper-validator-option/lib/validator.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers-generated.js create mode 100644 node_modules/@babel/helpers/lib/helpers-generated.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/AsyncGenerator.js create mode 100644 node_modules/@babel/helpers/lib/helpers/AsyncGenerator.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/OverloadYield.js create mode 100644 node_modules/@babel/helpers/lib/helpers/OverloadYield.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs.js create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2203.js create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2203.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2203R.js create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2203R.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2301.js create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2301.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2305.js create mode 100644 node_modules/@babel/helpers/lib/helpers/applyDecs2305.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/asyncGeneratorDelegate.js create mode 100644 node_modules/@babel/helpers/lib/helpers/asyncGeneratorDelegate.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/asyncIterator.js create mode 100644 node_modules/@babel/helpers/lib/helpers/asyncIterator.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/awaitAsyncGenerator.js create mode 100644 node_modules/@babel/helpers/lib/helpers/awaitAsyncGenerator.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/checkInRHS.js create mode 100644 node_modules/@babel/helpers/lib/helpers/checkInRHS.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/defineAccessor.js create mode 100644 node_modules/@babel/helpers/lib/helpers/defineAccessor.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/dispose.js create mode 100644 node_modules/@babel/helpers/lib/helpers/dispose.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/iterableToArrayLimit.js create mode 100644 node_modules/@babel/helpers/lib/helpers/iterableToArrayLimit.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/iterableToArrayLimitLoose.js create mode 100644 node_modules/@babel/helpers/lib/helpers/iterableToArrayLimitLoose.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/jsx.js create mode 100644 node_modules/@babel/helpers/lib/helpers/jsx.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/objectSpread2.js create mode 100644 node_modules/@babel/helpers/lib/helpers/objectSpread2.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/regeneratorRuntime.js create mode 100644 node_modules/@babel/helpers/lib/helpers/regeneratorRuntime.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/typeof.js create mode 100644 node_modules/@babel/helpers/lib/helpers/typeof.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/using.js create mode 100644 node_modules/@babel/helpers/lib/helpers/using.js.map create mode 100644 node_modules/@babel/helpers/lib/helpers/wrapRegExp.js create mode 100644 node_modules/@babel/helpers/lib/helpers/wrapRegExp.js.map create mode 100644 node_modules/@babel/helpers/lib/index.js.map create mode 100644 node_modules/@babel/helpers/scripts/generate-helpers.js create mode 100644 node_modules/@babel/helpers/scripts/generate-regenerator-runtime.js rename node_modules/@babel/{traverse => helpers}/scripts/package.json (100%) create mode 100644 node_modules/@babel/parser/index.cjs create mode 100644 node_modules/@babel/parser/lib/options.js create mode 100644 node_modules/@babel/parser/lib/options.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error.js create mode 100644 node_modules/@babel/parser/lib/parse-error.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/credentials.js create mode 100644 node_modules/@babel/parser/lib/parse-error/credentials.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/module-errors.js create mode 100644 node_modules/@babel/parser/lib/parse-error/module-errors.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js create mode 100644 node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/standard-errors.js create mode 100644 node_modules/@babel/parser/lib/parse-error/standard-errors.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js create mode 100644 node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js.map create mode 100644 node_modules/@babel/parser/lib/parse-error/to-node-description.js create mode 100644 node_modules/@babel/parser/lib/parse-error/to-node-description.js.map create mode 100644 node_modules/@babel/parser/lib/parser/base.js create mode 100644 node_modules/@babel/parser/lib/parser/base.js.map create mode 100644 node_modules/@babel/parser/lib/parser/comments.js create mode 100644 node_modules/@babel/parser/lib/parser/comments.js.map create mode 100644 node_modules/@babel/parser/lib/parser/expression.js create mode 100644 node_modules/@babel/parser/lib/parser/expression.js.map create mode 100644 node_modules/@babel/parser/lib/parser/index.js create mode 100644 node_modules/@babel/parser/lib/parser/index.js.map create mode 100644 node_modules/@babel/parser/lib/parser/lval.js create mode 100644 node_modules/@babel/parser/lib/parser/lval.js.map create mode 100644 node_modules/@babel/parser/lib/parser/node.js create mode 100644 node_modules/@babel/parser/lib/parser/node.js.map create mode 100644 node_modules/@babel/parser/lib/parser/statement.js create mode 100644 node_modules/@babel/parser/lib/parser/statement.js.map create mode 100644 node_modules/@babel/parser/lib/parser/util.js create mode 100644 node_modules/@babel/parser/lib/parser/util.js.map create mode 100644 node_modules/@babel/parser/lib/plugin-utils.js create mode 100644 node_modules/@babel/parser/lib/plugin-utils.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/estree.js create mode 100644 node_modules/@babel/parser/lib/plugins/estree.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/flow/index.js create mode 100644 node_modules/@babel/parser/lib/plugins/flow/index.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/flow/scope.js create mode 100644 node_modules/@babel/parser/lib/plugins/flow/scope.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/jsx/index.js create mode 100644 node_modules/@babel/parser/lib/plugins/jsx/index.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/jsx/xhtml.js create mode 100644 node_modules/@babel/parser/lib/plugins/jsx/xhtml.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/placeholders.js create mode 100644 node_modules/@babel/parser/lib/plugins/placeholders.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/typescript/index.js create mode 100644 node_modules/@babel/parser/lib/plugins/typescript/index.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/typescript/scope.js create mode 100644 node_modules/@babel/parser/lib/plugins/typescript/scope.js.map create mode 100644 node_modules/@babel/parser/lib/plugins/v8intrinsic.js create mode 100644 node_modules/@babel/parser/lib/plugins/v8intrinsic.js.map create mode 100644 node_modules/@babel/parser/lib/tokenizer/context.js create mode 100644 node_modules/@babel/parser/lib/tokenizer/context.js.map create mode 100644 node_modules/@babel/parser/lib/tokenizer/index.js create mode 100644 node_modules/@babel/parser/lib/tokenizer/index.js.map create mode 100644 node_modules/@babel/parser/lib/tokenizer/state.js create mode 100644 node_modules/@babel/parser/lib/tokenizer/state.js.map create mode 100644 node_modules/@babel/parser/lib/tokenizer/types.js create mode 100644 node_modules/@babel/parser/lib/tokenizer/types.js.map create mode 100644 node_modules/@babel/parser/lib/util/class-scope.js create mode 100644 node_modules/@babel/parser/lib/util/class-scope.js.map create mode 100644 node_modules/@babel/parser/lib/util/expression-scope.js create mode 100644 node_modules/@babel/parser/lib/util/expression-scope.js.map create mode 100644 node_modules/@babel/parser/lib/util/identifier.js create mode 100644 node_modules/@babel/parser/lib/util/identifier.js.map create mode 100644 node_modules/@babel/parser/lib/util/location.js create mode 100644 node_modules/@babel/parser/lib/util/location.js.map create mode 100644 node_modules/@babel/parser/lib/util/production-parameter.js create mode 100644 node_modules/@babel/parser/lib/util/production-parameter.js.map create mode 100644 node_modules/@babel/parser/lib/util/scope.js create mode 100644 node_modules/@babel/parser/lib/util/scope.js.map create mode 100644 node_modules/@babel/parser/lib/util/scopeflags.js create mode 100644 node_modules/@babel/parser/lib/util/scopeflags.js.map create mode 100644 node_modules/@babel/parser/lib/util/whitespace.js create mode 100644 node_modules/@babel/parser/lib/util/whitespace.js.map rename node_modules/@babel/{helper-replace-supers => plugin-syntax-jsx}/LICENSE (100%) create mode 100644 node_modules/@babel/plugin-syntax-jsx/README.md create mode 100644 node_modules/@babel/plugin-syntax-jsx/lib/index.js create mode 100644 node_modules/@babel/plugin-syntax-jsx/lib/index.js.map create mode 100644 node_modules/@babel/plugin-syntax-jsx/package.json create mode 100644 node_modules/@babel/plugin-syntax-typescript/LICENSE create mode 100644 node_modules/@babel/plugin-syntax-typescript/README.md create mode 100644 node_modules/@babel/plugin-syntax-typescript/lib/index.js create mode 100644 node_modules/@babel/plugin-syntax-typescript/lib/index.js.map create mode 100644 node_modules/@babel/plugin-syntax-typescript/package.json create mode 100644 node_modules/@babel/template/lib/builder.js.map create mode 100644 node_modules/@babel/template/lib/formatters.js.map create mode 100644 node_modules/@babel/template/lib/index.js.map create mode 100644 node_modules/@babel/template/lib/literal.js.map create mode 100644 node_modules/@babel/template/lib/options.js.map create mode 100644 node_modules/@babel/template/lib/parse.js.map create mode 100644 node_modules/@babel/template/lib/populate.js.map create mode 100644 node_modules/@babel/template/lib/string.js.map create mode 100644 node_modules/@babel/template/node_modules/@babel/code-frame/lib/index.js.map create mode 100644 node_modules/@babel/traverse/lib/cache.js.map create mode 100644 node_modules/@babel/traverse/lib/context.js.map create mode 100644 node_modules/@babel/traverse/lib/hub.js.map create mode 100644 node_modules/@babel/traverse/lib/index.js.map create mode 100644 node_modules/@babel/traverse/lib/path/ancestry.js.map create mode 100644 node_modules/@babel/traverse/lib/path/comments.js.map create mode 100644 node_modules/@babel/traverse/lib/path/context.js.map create mode 100644 node_modules/@babel/traverse/lib/path/conversion.js.map create mode 100644 node_modules/@babel/traverse/lib/path/evaluation.js.map create mode 100644 node_modules/@babel/traverse/lib/path/family.js.map delete mode 100644 node_modules/@babel/traverse/lib/path/generated/asserts.js delete mode 100644 node_modules/@babel/traverse/lib/path/generated/validators.js delete mode 100644 node_modules/@babel/traverse/lib/path/generated/virtual-types.js create mode 100644 node_modules/@babel/traverse/lib/path/index.js.map create mode 100644 node_modules/@babel/traverse/lib/path/inference/index.js.map create mode 100644 node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map create mode 100644 node_modules/@babel/traverse/lib/path/inference/inferers.js.map create mode 100644 node_modules/@babel/traverse/lib/path/inference/util.js create mode 100644 node_modules/@babel/traverse/lib/path/inference/util.js.map create mode 100644 node_modules/@babel/traverse/lib/path/introspection.js.map create mode 100644 node_modules/@babel/traverse/lib/path/lib/hoister.js.map create mode 100644 node_modules/@babel/traverse/lib/path/lib/removal-hooks.js.map create mode 100644 node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js create mode 100644 node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js.map create mode 100644 node_modules/@babel/traverse/lib/path/lib/virtual-types.js.map create mode 100644 node_modules/@babel/traverse/lib/path/modification.js.map create mode 100644 node_modules/@babel/traverse/lib/path/removal.js.map create mode 100644 node_modules/@babel/traverse/lib/path/replacement.js.map create mode 100644 node_modules/@babel/traverse/lib/scope/binding.js.map create mode 100644 node_modules/@babel/traverse/lib/scope/index.js.map create mode 100644 node_modules/@babel/traverse/lib/scope/lib/renamer.js.map create mode 100644 node_modules/@babel/traverse/lib/traverse-node.js create mode 100644 node_modules/@babel/traverse/lib/traverse-node.js.map create mode 100644 node_modules/@babel/traverse/lib/types.js.map create mode 100644 node_modules/@babel/traverse/lib/visitors.js.map create mode 100644 node_modules/@babel/traverse/node_modules/@babel/code-frame/lib/index.js.map delete mode 100644 node_modules/@babel/traverse/scripts/generators/asserts.js delete mode 100644 node_modules/@babel/traverse/scripts/generators/validators.js delete mode 100644 node_modules/@babel/traverse/scripts/generators/virtual-types.js create mode 100644 node_modules/@babel/types/lib/asserts/assertNode.js.map create mode 100644 node_modules/@babel/types/lib/asserts/generated/index.js.map create mode 100644 node_modules/@babel/types/lib/ast-types/generated/index.js.map delete mode 100644 node_modules/@babel/types/lib/builders/builder.js create mode 100644 node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map create mode 100644 node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map create mode 100644 node_modules/@babel/types/lib/builders/generated/index.js.map create mode 100644 node_modules/@babel/types/lib/builders/generated/uppercase.js.map create mode 100644 node_modules/@babel/types/lib/builders/react/buildChildren.js.map create mode 100644 node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map create mode 100644 node_modules/@babel/types/lib/builders/validateNode.js create mode 100644 node_modules/@babel/types/lib/builders/validateNode.js.map create mode 100644 node_modules/@babel/types/lib/clone/clone.js.map create mode 100644 node_modules/@babel/types/lib/clone/cloneDeep.js.map create mode 100644 node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map create mode 100644 node_modules/@babel/types/lib/clone/cloneNode.js.map create mode 100644 node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map create mode 100644 node_modules/@babel/types/lib/comments/addComment.js.map create mode 100644 node_modules/@babel/types/lib/comments/addComments.js.map create mode 100644 node_modules/@babel/types/lib/comments/inheritInnerComments.js.map create mode 100644 node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map create mode 100644 node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map create mode 100644 node_modules/@babel/types/lib/comments/inheritsComments.js.map create mode 100644 node_modules/@babel/types/lib/comments/removeComments.js.map create mode 100644 node_modules/@babel/types/lib/constants/generated/index.js.map create mode 100644 node_modules/@babel/types/lib/constants/index.js.map create mode 100644 node_modules/@babel/types/lib/converters/ensureBlock.js.map create mode 100644 node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map create mode 100644 node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map create mode 100644 node_modules/@babel/types/lib/converters/toBlock.js.map create mode 100644 node_modules/@babel/types/lib/converters/toComputedKey.js.map create mode 100644 node_modules/@babel/types/lib/converters/toExpression.js.map create mode 100644 node_modules/@babel/types/lib/converters/toIdentifier.js.map create mode 100644 node_modules/@babel/types/lib/converters/toKeyAlias.js.map create mode 100644 node_modules/@babel/types/lib/converters/toSequenceExpression.js.map create mode 100644 node_modules/@babel/types/lib/converters/toStatement.js.map create mode 100644 node_modules/@babel/types/lib/converters/valueToNode.js.map create mode 100644 node_modules/@babel/types/lib/definitions/core.js.map create mode 100644 node_modules/@babel/types/lib/definitions/deprecated-aliases.js create mode 100644 node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map create mode 100644 node_modules/@babel/types/lib/definitions/experimental.js.map create mode 100644 node_modules/@babel/types/lib/definitions/flow.js.map create mode 100644 node_modules/@babel/types/lib/definitions/index.js.map create mode 100644 node_modules/@babel/types/lib/definitions/jsx.js.map create mode 100644 node_modules/@babel/types/lib/definitions/misc.js.map create mode 100644 node_modules/@babel/types/lib/definitions/placeholders.js.map create mode 100644 node_modules/@babel/types/lib/definitions/typescript.js.map create mode 100644 node_modules/@babel/types/lib/definitions/utils.js.map create mode 100644 node_modules/@babel/types/lib/index.js.map create mode 100644 node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map create mode 100644 node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map create mode 100644 node_modules/@babel/types/lib/modifications/inherits.js.map create mode 100644 node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map create mode 100644 node_modules/@babel/types/lib/modifications/removeProperties.js.map create mode 100644 node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map create mode 100644 node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map create mode 100644 node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map create mode 100644 node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map create mode 100644 node_modules/@babel/types/lib/traverse/traverse.js.map create mode 100644 node_modules/@babel/types/lib/traverse/traverseFast.js.map create mode 100644 node_modules/@babel/types/lib/utils/deprecationWarning.js create mode 100644 node_modules/@babel/types/lib/utils/deprecationWarning.js.map create mode 100644 node_modules/@babel/types/lib/utils/inherit.js.map create mode 100644 node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map create mode 100644 node_modules/@babel/types/lib/utils/shallowEqual.js.map create mode 100644 node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map create mode 100644 node_modules/@babel/types/lib/validators/generated/index.js.map create mode 100644 node_modules/@babel/types/lib/validators/is.js.map create mode 100644 node_modules/@babel/types/lib/validators/isBinding.js.map create mode 100644 node_modules/@babel/types/lib/validators/isBlockScoped.js.map create mode 100644 node_modules/@babel/types/lib/validators/isImmutable.js.map create mode 100644 node_modules/@babel/types/lib/validators/isLet.js.map create mode 100644 node_modules/@babel/types/lib/validators/isNode.js.map create mode 100644 node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map create mode 100644 node_modules/@babel/types/lib/validators/isPlaceholderType.js.map create mode 100644 node_modules/@babel/types/lib/validators/isReferenced.js.map create mode 100644 node_modules/@babel/types/lib/validators/isScope.js.map create mode 100644 node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map create mode 100644 node_modules/@babel/types/lib/validators/isType.js.map create mode 100644 node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map create mode 100644 node_modules/@babel/types/lib/validators/isValidIdentifier.js.map create mode 100644 node_modules/@babel/types/lib/validators/isVar.js.map create mode 100644 node_modules/@babel/types/lib/validators/matchesPattern.js.map create mode 100644 node_modules/@babel/types/lib/validators/react/isCompatTag.js.map create mode 100644 node_modules/@babel/types/lib/validators/react/isReactComponent.js.map create mode 100644 node_modules/@babel/types/lib/validators/validate.js.map delete mode 100644 node_modules/@babel/types/scripts/generators/asserts.js delete mode 100644 node_modules/@babel/types/scripts/generators/ast-types.js delete mode 100644 node_modules/@babel/types/scripts/generators/builders.js delete mode 100644 node_modules/@babel/types/scripts/generators/constants.js delete mode 100644 node_modules/@babel/types/scripts/generators/docs.js delete mode 100644 node_modules/@babel/types/scripts/generators/flow.js delete mode 100644 node_modules/@babel/types/scripts/generators/typescript-legacy.js delete mode 100644 node_modules/@babel/types/scripts/generators/validators.js delete mode 100644 node_modules/@babel/types/scripts/package.json delete mode 100644 node_modules/@babel/types/scripts/utils/formatBuilderName.js delete mode 100644 node_modules/@babel/types/scripts/utils/lowerFirst.js delete mode 100644 node_modules/@babel/types/scripts/utils/stringifyValidator.js delete mode 100644 node_modules/@babel/types/scripts/utils/toFunctionName.js delete mode 100644 node_modules/@cnakazawa/watch/LICENSE delete mode 100644 node_modules/@cnakazawa/watch/README.md delete mode 100755 node_modules/@cnakazawa/watch/cli.js delete mode 100644 node_modules/@cnakazawa/watch/main.js delete mode 100644 node_modules/@cnakazawa/watch/package.json delete mode 100755 node_modules/@cnakazawa/watch/scripts/release.sh delete mode 100644 node_modules/@jest/console/build/BufferedConsole.d.ts delete mode 100644 node_modules/@jest/console/build/CustomConsole.d.ts delete mode 100644 node_modules/@jest/console/build/NullConsole.d.ts delete mode 100644 node_modules/@jest/console/build/getConsoleOutput.d.ts delete mode 100644 node_modules/@jest/console/build/types.d.ts delete mode 100644 node_modules/@jest/core/build/FailedTestsCache.d.ts create mode 100644 node_modules/@jest/core/build/FailedTestsInteractiveMode.js delete mode 100644 node_modules/@jest/core/build/ReporterDispatcher.d.ts delete mode 100644 node_modules/@jest/core/build/SearchSource.d.ts delete mode 100644 node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts delete mode 100644 node_modules/@jest/core/build/TestNamePatternPrompt.d.ts delete mode 100644 node_modules/@jest/core/build/TestPathPatternPrompt.d.ts delete mode 100644 node_modules/@jest/core/build/TestScheduler.d.ts delete mode 100644 node_modules/@jest/core/build/TestWatcher.d.ts delete mode 100644 node_modules/@jest/core/build/TestWatcher.js delete mode 100644 node_modules/@jest/core/build/assets/jest_logo.png delete mode 100644 node_modules/@jest/core/build/cli/index.d.ts delete mode 100644 node_modules/@jest/core/build/collectHandles.d.ts delete mode 100644 node_modules/@jest/core/build/getChangedFilesPromise.d.ts delete mode 100644 node_modules/@jest/core/build/getConfigsOfProjectsToRun.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFound.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundFailed.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts delete mode 100644 node_modules/@jest/core/build/getProjectDisplayName.d.ts delete mode 100644 node_modules/@jest/core/build/getProjectNamesMissingWarning.d.ts delete mode 100644 node_modules/@jest/core/build/getSelectProjectsMessage.d.ts create mode 100644 node_modules/@jest/core/build/index.d.ts create mode 100644 node_modules/@jest/core/build/index.js delete mode 100644 node_modules/@jest/core/build/jest.d.ts delete mode 100644 node_modules/@jest/core/build/jest.js delete mode 100644 node_modules/@jest/core/build/lib/activeFiltersMessage.d.ts delete mode 100644 node_modules/@jest/core/build/lib/createContext.d.ts delete mode 100644 node_modules/@jest/core/build/lib/handleDeprecationWarnings.d.ts delete mode 100644 node_modules/@jest/core/build/lib/isValidPath.d.ts delete mode 100644 node_modules/@jest/core/build/lib/logDebugMessages.d.ts delete mode 100644 node_modules/@jest/core/build/lib/updateGlobalConfig.d.ts delete mode 100644 node_modules/@jest/core/build/lib/watchPluginsHelpers.d.ts create mode 100644 node_modules/@jest/core/build/plugins/FailedTestsInteractive.js delete mode 100644 node_modules/@jest/core/build/plugins/Quit.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/TestNamePattern.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/TestPathPattern.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/UpdateSnapshots.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/UpdateSnapshotsInteractive.d.ts delete mode 100644 node_modules/@jest/core/build/pluralize.d.ts delete mode 100644 node_modules/@jest/core/build/runGlobalHook.d.ts delete mode 100644 node_modules/@jest/core/build/runJest.d.ts delete mode 100644 node_modules/@jest/core/build/testSchedulerHelper.d.ts delete mode 100644 node_modules/@jest/core/build/types.d.ts delete mode 100644 node_modules/@jest/core/build/version.d.ts delete mode 100644 node_modules/@jest/core/build/watch.d.ts create mode 100644 node_modules/@jest/expect-utils/LICENSE create mode 100644 node_modules/@jest/expect-utils/README.md create mode 100644 node_modules/@jest/expect-utils/build/immutableUtils.js create mode 100644 node_modules/@jest/expect-utils/build/index.d.ts create mode 100644 node_modules/@jest/expect-utils/build/index.js create mode 100644 node_modules/@jest/expect-utils/build/jasmineUtils.js rename node_modules/{jest-runtime => @jest/expect-utils}/build/types.js (100%) create mode 100644 node_modules/@jest/expect-utils/build/utils.js create mode 100644 node_modules/@jest/expect-utils/package.json create mode 100644 node_modules/@jest/expect/LICENSE create mode 100644 node_modules/@jest/expect/README.md create mode 100644 node_modules/@jest/expect/build/index.d.ts create mode 100644 node_modules/@jest/expect/build/index.js rename node_modules/{jest/node_modules/jest-cli/build/init => @jest/expect/build}/types.js (100%) create mode 100644 node_modules/@jest/expect/package.json delete mode 100644 node_modules/@jest/fake-timers/build/legacyFakeTimers.d.ts delete mode 100644 node_modules/@jest/fake-timers/build/modernFakeTimers.d.ts create mode 100644 node_modules/@jest/reporters/assets/jest_logo.png delete mode 100644 node_modules/@jest/reporters/build/BaseReporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/CoverageReporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/CoverageWorker.d.ts delete mode 100644 node_modules/@jest/reporters/build/DefaultReporter.d.ts create mode 100644 node_modules/@jest/reporters/build/GitHubActionsReporter.js delete mode 100644 node_modules/@jest/reporters/build/NotifyReporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/Status.d.ts delete mode 100644 node_modules/@jest/reporters/build/SummaryReporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/VerboseReporter.d.ts create mode 100644 node_modules/@jest/reporters/build/formatTestPath.js delete mode 100644 node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts delete mode 100644 node_modules/@jest/reporters/build/getResultHeader.d.ts delete mode 100644 node_modules/@jest/reporters/build/getSnapshotStatus.d.ts delete mode 100644 node_modules/@jest/reporters/build/getSnapshotSummary.d.ts create mode 100644 node_modules/@jest/reporters/build/getSummary.js delete mode 100644 node_modules/@jest/reporters/build/getWatermarks.d.ts create mode 100644 node_modules/@jest/reporters/build/printDisplayName.js create mode 100644 node_modules/@jest/reporters/build/relativePath.js create mode 100644 node_modules/@jest/reporters/build/trimAndFormatPath.js delete mode 100644 node_modules/@jest/reporters/build/types.d.ts delete mode 100644 node_modules/@jest/reporters/build/utils.d.ts delete mode 100644 node_modules/@jest/reporters/build/utils.js create mode 100644 node_modules/@jest/reporters/build/wrapAnsiString.js create mode 100644 node_modules/@jest/schemas/LICENSE create mode 100644 node_modules/@jest/schemas/README.md create mode 100644 node_modules/@jest/schemas/build/index.d.ts create mode 100644 node_modules/@jest/schemas/build/index.js create mode 100644 node_modules/@jest/schemas/package.json delete mode 100644 node_modules/@jest/source-map/build/getCallsite.d.ts delete mode 100644 node_modules/@jest/source-map/build/types.d.ts delete mode 100644 node_modules/@jest/test-result/build/formatTestResults.d.ts delete mode 100644 node_modules/@jest/test-result/build/helpers.d.ts delete mode 100644 node_modules/@jest/test-result/build/types.d.ts delete mode 100644 node_modules/@jest/transform/build/ScriptTransformer.d.ts delete mode 100644 node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts create mode 100644 node_modules/@jest/transform/build/runtimeErrorsAndWarnings.js delete mode 100644 node_modules/@jest/transform/build/shouldInstrument.d.ts delete mode 100644 node_modules/@jest/transform/build/types.d.ts create mode 100644 node_modules/@jest/types/README.md delete mode 100644 node_modules/@jest/types/build/Circus.d.ts delete mode 100644 node_modules/@jest/types/build/Config.d.ts delete mode 100644 node_modules/@jest/types/build/Global.d.ts delete mode 100644 node_modules/@jest/types/build/TestResult.d.ts delete mode 100644 node_modules/@jest/types/build/Transform.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/LICENSE create mode 100644 node_modules/@jridgewell/gen-mapping/README.md create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js create mode 100644 node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts create mode 100644 node_modules/@jridgewell/gen-mapping/package.json create mode 100644 node_modules/@jridgewell/resolve-uri/LICENSE create mode 100644 node_modules/@jridgewell/resolve-uri/README.md create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js create mode 100644 node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map create mode 100644 node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts create mode 100644 node_modules/@jridgewell/resolve-uri/package.json create mode 100644 node_modules/@jridgewell/set-array/LICENSE create mode 100644 node_modules/@jridgewell/set-array/README.md create mode 100644 node_modules/@jridgewell/set-array/dist/set-array.mjs create mode 100644 node_modules/@jridgewell/set-array/dist/set-array.mjs.map create mode 100644 node_modules/@jridgewell/set-array/dist/set-array.umd.js create mode 100644 node_modules/@jridgewell/set-array/dist/set-array.umd.js.map create mode 100644 node_modules/@jridgewell/set-array/dist/types/set-array.d.ts create mode 100644 node_modules/@jridgewell/set-array/package.json create mode 100644 node_modules/@jridgewell/set-array/src/set-array.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/LICENSE create mode 100644 node_modules/@jridgewell/sourcemap-codec/README.md create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map create mode 100644 node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts create mode 100644 node_modules/@jridgewell/sourcemap-codec/package.json create mode 100644 node_modules/@jridgewell/trace-mapping/LICENSE create mode 100644 node_modules/@jridgewell/trace-mapping/README.md create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js create mode 100644 node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/LICENSE create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/README.md create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/package.json create mode 100644 node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts create mode 100644 node_modules/@jridgewell/trace-mapping/package.json create mode 100644 node_modules/@sinclair/typebox/compiler/compiler.d.ts create mode 100644 node_modules/@sinclair/typebox/compiler/compiler.js create mode 100644 node_modules/@sinclair/typebox/compiler/index.d.ts create mode 100644 node_modules/@sinclair/typebox/compiler/index.js create mode 100644 node_modules/@sinclair/typebox/conditional/conditional.d.ts create mode 100644 node_modules/@sinclair/typebox/conditional/conditional.js create mode 100644 node_modules/@sinclair/typebox/conditional/index.d.ts create mode 100644 node_modules/@sinclair/typebox/conditional/index.js create mode 100644 node_modules/@sinclair/typebox/conditional/structural.d.ts create mode 100644 node_modules/@sinclair/typebox/conditional/structural.js create mode 100644 node_modules/@sinclair/typebox/custom/custom.d.ts create mode 100644 node_modules/@sinclair/typebox/custom/custom.js create mode 100644 node_modules/@sinclair/typebox/custom/index.d.ts create mode 100644 node_modules/@sinclair/typebox/custom/index.js create mode 100644 node_modules/@sinclair/typebox/errors/errors.d.ts create mode 100644 node_modules/@sinclair/typebox/errors/errors.js create mode 100644 node_modules/@sinclair/typebox/errors/index.d.ts create mode 100644 node_modules/@sinclair/typebox/errors/index.js create mode 100644 node_modules/@sinclair/typebox/format/format.d.ts create mode 100644 node_modules/@sinclair/typebox/format/format.js create mode 100644 node_modules/@sinclair/typebox/format/index.d.ts create mode 100644 node_modules/@sinclair/typebox/format/index.js create mode 100644 node_modules/@sinclair/typebox/guard/extends.d.ts create mode 100644 node_modules/@sinclair/typebox/guard/extends.js create mode 100644 node_modules/@sinclair/typebox/guard/guard.d.ts create mode 100644 node_modules/@sinclair/typebox/guard/guard.js create mode 100644 node_modules/@sinclair/typebox/guard/index.d.ts create mode 100644 node_modules/@sinclair/typebox/guard/index.js create mode 100644 node_modules/@sinclair/typebox/hash/hash.d.ts create mode 100644 node_modules/@sinclair/typebox/hash/hash.js create mode 100644 node_modules/@sinclair/typebox/hash/index.d.ts create mode 100644 node_modules/@sinclair/typebox/hash/index.js create mode 100644 node_modules/@sinclair/typebox/license create mode 100644 node_modules/@sinclair/typebox/package.json create mode 100644 node_modules/@sinclair/typebox/readme.md create mode 100644 node_modules/@sinclair/typebox/system/index.d.ts create mode 100644 node_modules/@sinclair/typebox/system/index.js create mode 100644 node_modules/@sinclair/typebox/system/system.d.ts create mode 100644 node_modules/@sinclair/typebox/system/system.js create mode 100644 node_modules/@sinclair/typebox/typebox.d.ts create mode 100644 node_modules/@sinclair/typebox/typebox.js create mode 100644 node_modules/@sinclair/typebox/value/cast.d.ts create mode 100644 node_modules/@sinclair/typebox/value/cast.js create mode 100644 node_modules/@sinclair/typebox/value/check.d.ts create mode 100644 node_modules/@sinclair/typebox/value/check.js create mode 100644 node_modules/@sinclair/typebox/value/clone.d.ts create mode 100644 node_modules/@sinclair/typebox/value/clone.js create mode 100644 node_modules/@sinclair/typebox/value/create.d.ts create mode 100644 node_modules/@sinclair/typebox/value/create.js create mode 100644 node_modules/@sinclair/typebox/value/delta.d.ts create mode 100644 node_modules/@sinclair/typebox/value/delta.js create mode 100644 node_modules/@sinclair/typebox/value/equal.d.ts create mode 100644 node_modules/@sinclair/typebox/value/equal.js create mode 100644 node_modules/@sinclair/typebox/value/index.d.ts create mode 100644 node_modules/@sinclair/typebox/value/index.js create mode 100644 node_modules/@sinclair/typebox/value/is.d.ts create mode 100644 node_modules/@sinclair/typebox/value/is.js create mode 100644 node_modules/@sinclair/typebox/value/pointer.d.ts create mode 100644 node_modules/@sinclair/typebox/value/pointer.js create mode 100644 node_modules/@sinclair/typebox/value/value.d.ts create mode 100644 node_modules/@sinclair/typebox/value/value.js delete mode 100644 node_modules/@sinonjs/commons/CHANGES.md create mode 100644 node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.js create mode 100644 node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.test.js delete mode 100644 node_modules/@sinonjs/commons/lib/prototypes/copy-prototype.js create mode 100644 node_modules/@sinonjs/commons/lib/prototypes/throws-on-proto.js rename node_modules/@sinonjs/commons/types/prototypes/{copy-prototype.d.ts => copy-prototype-methods.d.ts} (100%) create mode 100644 node_modules/@sinonjs/commons/types/prototypes/throws-on-proto.d.ts delete mode 100644 node_modules/@sinonjs/fake-timers/CHANGELOG.md delete mode 100644 node_modules/@sinonjs/fake-timers/fake-timers.js mode change 100644 => 100755 node_modules/@types/babel__core/LICENSE mode change 100644 => 100755 node_modules/@types/babel__core/README.md mode change 100644 => 100755 node_modules/@types/babel__core/index.d.ts mode change 100644 => 100755 node_modules/@types/babel__core/package.json mode change 100644 => 100755 node_modules/@types/babel__generator/LICENSE mode change 100644 => 100755 node_modules/@types/babel__generator/README.md mode change 100644 => 100755 node_modules/@types/babel__generator/index.d.ts mode change 100644 => 100755 node_modules/@types/babel__generator/package.json mode change 100644 => 100755 node_modules/@types/babel__template/LICENSE mode change 100644 => 100755 node_modules/@types/babel__template/README.md mode change 100644 => 100755 node_modules/@types/babel__template/index.d.ts mode change 100644 => 100755 node_modules/@types/babel__template/package.json mode change 100644 => 100755 node_modules/@types/babel__traverse/LICENSE mode change 100644 => 100755 node_modules/@types/babel__traverse/README.md mode change 100644 => 100755 node_modules/@types/babel__traverse/index.d.ts mode change 100644 => 100755 node_modules/@types/babel__traverse/package.json delete mode 100644 node_modules/@types/babel__traverse/ts4.1/index.d.ts mode change 100644 => 100755 node_modules/@types/graceful-fs/LICENSE mode change 100644 => 100755 node_modules/@types/graceful-fs/README.md mode change 100644 => 100755 node_modules/@types/graceful-fs/index.d.ts mode change 100644 => 100755 node_modules/@types/graceful-fs/package.json mode change 100644 => 100755 node_modules/@types/istanbul-lib-coverage/LICENSE mode change 100644 => 100755 node_modules/@types/istanbul-lib-coverage/README.md mode change 100644 => 100755 node_modules/@types/istanbul-lib-coverage/index.d.ts mode change 100644 => 100755 node_modules/@types/istanbul-lib-coverage/package.json mode change 100644 => 100755 node_modules/@types/istanbul-reports/LICENSE mode change 100644 => 100755 node_modules/@types/istanbul-reports/README.md mode change 100644 => 100755 node_modules/@types/istanbul-reports/index.d.ts mode change 100644 => 100755 node_modules/@types/istanbul-reports/package.json create mode 100755 node_modules/@types/node/assert/strict.d.ts delete mode 100755 node_modules/@types/node/base.d.ts create mode 100755 node_modules/@types/node/diagnostics_channel.d.ts create mode 100755 node_modules/@types/node/dns/promises.d.ts create mode 100755 node_modules/@types/node/dom-events.d.ts create mode 100755 node_modules/@types/node/readline/promises.d.ts create mode 100755 node_modules/@types/node/stream/consumers.d.ts create mode 100755 node_modules/@types/node/stream/promises.d.ts create mode 100755 node_modules/@types/node/stream/web.d.ts create mode 100755 node_modules/@types/node/test.d.ts create mode 100755 node_modules/@types/node/timers/promises.d.ts delete mode 100755 node_modules/@types/node/ts3.6/assert.d.ts delete mode 100755 node_modules/@types/node/ts3.6/base.d.ts delete mode 100755 node_modules/@types/node/ts3.6/index.d.ts create mode 100755 node_modules/@types/node/ts4.8/assert.d.ts create mode 100755 node_modules/@types/node/ts4.8/assert/strict.d.ts create mode 100755 node_modules/@types/node/ts4.8/async_hooks.d.ts create mode 100755 node_modules/@types/node/ts4.8/buffer.d.ts create mode 100755 node_modules/@types/node/ts4.8/child_process.d.ts create mode 100755 node_modules/@types/node/ts4.8/cluster.d.ts create mode 100755 node_modules/@types/node/ts4.8/console.d.ts create mode 100755 node_modules/@types/node/ts4.8/constants.d.ts create mode 100755 node_modules/@types/node/ts4.8/crypto.d.ts create mode 100755 node_modules/@types/node/ts4.8/dgram.d.ts create mode 100755 node_modules/@types/node/ts4.8/diagnostics_channel.d.ts create mode 100755 node_modules/@types/node/ts4.8/dns.d.ts create mode 100755 node_modules/@types/node/ts4.8/dns/promises.d.ts create mode 100755 node_modules/@types/node/ts4.8/dom-events.d.ts create mode 100755 node_modules/@types/node/ts4.8/domain.d.ts create mode 100755 node_modules/@types/node/ts4.8/events.d.ts create mode 100755 node_modules/@types/node/ts4.8/fs.d.ts create mode 100755 node_modules/@types/node/ts4.8/fs/promises.d.ts create mode 100755 node_modules/@types/node/ts4.8/globals.d.ts create mode 100755 node_modules/@types/node/ts4.8/globals.global.d.ts create mode 100755 node_modules/@types/node/ts4.8/http.d.ts create mode 100755 node_modules/@types/node/ts4.8/http2.d.ts create mode 100755 node_modules/@types/node/ts4.8/https.d.ts create mode 100755 node_modules/@types/node/ts4.8/index.d.ts create mode 100755 node_modules/@types/node/ts4.8/inspector.d.ts create mode 100755 node_modules/@types/node/ts4.8/module.d.ts create mode 100755 node_modules/@types/node/ts4.8/net.d.ts create mode 100755 node_modules/@types/node/ts4.8/os.d.ts create mode 100755 node_modules/@types/node/ts4.8/path.d.ts create mode 100755 node_modules/@types/node/ts4.8/perf_hooks.d.ts create mode 100755 node_modules/@types/node/ts4.8/process.d.ts create mode 100755 node_modules/@types/node/ts4.8/punycode.d.ts create mode 100755 node_modules/@types/node/ts4.8/querystring.d.ts create mode 100755 node_modules/@types/node/ts4.8/readline.d.ts create mode 100755 node_modules/@types/node/ts4.8/readline/promises.d.ts create mode 100755 node_modules/@types/node/ts4.8/repl.d.ts create mode 100755 node_modules/@types/node/ts4.8/stream.d.ts create mode 100755 node_modules/@types/node/ts4.8/stream/consumers.d.ts create mode 100755 node_modules/@types/node/ts4.8/stream/promises.d.ts create mode 100755 node_modules/@types/node/ts4.8/stream/web.d.ts create mode 100755 node_modules/@types/node/ts4.8/string_decoder.d.ts create mode 100755 node_modules/@types/node/ts4.8/test.d.ts create mode 100755 node_modules/@types/node/ts4.8/timers.d.ts create mode 100755 node_modules/@types/node/ts4.8/timers/promises.d.ts create mode 100755 node_modules/@types/node/ts4.8/tls.d.ts create mode 100755 node_modules/@types/node/ts4.8/trace_events.d.ts create mode 100755 node_modules/@types/node/ts4.8/tty.d.ts create mode 100755 node_modules/@types/node/ts4.8/url.d.ts create mode 100755 node_modules/@types/node/ts4.8/util.d.ts create mode 100755 node_modules/@types/node/ts4.8/v8.d.ts create mode 100755 node_modules/@types/node/ts4.8/vm.d.ts create mode 100755 node_modules/@types/node/ts4.8/wasi.d.ts create mode 100755 node_modules/@types/node/ts4.8/worker_threads.d.ts create mode 100755 node_modules/@types/node/ts4.8/zlib.d.ts delete mode 100755 node_modules/@types/normalize-package-data/LICENSE delete mode 100755 node_modules/@types/normalize-package-data/README.md delete mode 100755 node_modules/@types/normalize-package-data/index.d.ts delete mode 100755 node_modules/@types/normalize-package-data/package.json mode change 100644 => 100755 node_modules/@types/prettier/LICENSE mode change 100644 => 100755 node_modules/@types/prettier/README.md mode change 100644 => 100755 node_modules/@types/prettier/doc.d.ts mode change 100644 => 100755 node_modules/@types/prettier/index.d.ts mode change 100644 => 100755 node_modules/@types/prettier/package.json mode change 100644 => 100755 node_modules/@types/prettier/parser-angular.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-babel.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-espree.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-flow.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-glimmer.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-graphql.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-html.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-markdown.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-meriyah.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-postcss.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-typescript.d.ts mode change 100644 => 100755 node_modules/@types/prettier/parser-yaml.d.ts mode change 100644 => 100755 node_modules/@types/prettier/standalone.d.ts mode change 100644 => 100755 node_modules/@types/stack-utils/LICENSE mode change 100644 => 100755 node_modules/@types/stack-utils/README.md mode change 100644 => 100755 node_modules/@types/stack-utils/index.d.ts mode change 100644 => 100755 node_modules/@types/stack-utils/package.json mode change 100644 => 100755 node_modules/@types/yargs-parser/LICENSE mode change 100644 => 100755 node_modules/@types/yargs-parser/README.md mode change 100644 => 100755 node_modules/@types/yargs-parser/index.d.ts mode change 100644 => 100755 node_modules/@types/yargs-parser/package.json mode change 100644 => 100755 node_modules/@types/yargs/LICENSE mode change 100644 => 100755 node_modules/@types/yargs/README.md create mode 100755 node_modules/@types/yargs/helpers.d.mts create mode 100755 node_modules/@types/yargs/helpers.d.ts create mode 100755 node_modules/@types/yargs/index.d.mts mode change 100644 => 100755 node_modules/@types/yargs/index.d.ts mode change 100644 => 100755 node_modules/@types/yargs/package.json mode change 100644 => 100755 node_modules/@types/yargs/yargs.d.ts delete mode 100644 node_modules/abab/CHANGELOG.md delete mode 100644 node_modules/abab/LICENSE.md delete mode 100644 node_modules/abab/README.md delete mode 100644 node_modules/abab/index.d.ts delete mode 100644 node_modules/abab/index.js delete mode 100644 node_modules/abab/lib/atob.js delete mode 100644 node_modules/abab/lib/btoa.js delete mode 100644 node_modules/abab/package.json delete mode 100644 node_modules/acorn-globals/LICENSE delete mode 100644 node_modules/acorn-globals/README.md delete mode 100644 node_modules/acorn-globals/index.js delete mode 100644 node_modules/acorn-globals/package.json delete mode 100644 node_modules/acorn-walk/CHANGELOG.md delete mode 100644 node_modules/acorn-walk/LICENSE delete mode 100644 node_modules/acorn-walk/README.md delete mode 100644 node_modules/acorn-walk/dist/walk.d.ts delete mode 100644 node_modules/acorn-walk/dist/walk.js delete mode 100644 node_modules/acorn-walk/dist/walk.js.map delete mode 100644 node_modules/acorn-walk/dist/walk.mjs delete mode 100644 node_modules/acorn-walk/dist/walk.mjs.map delete mode 100644 node_modules/acorn-walk/package.json 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 100644 node_modules/arr-union/LICENSE delete mode 100644 node_modules/arr-union/README.md delete mode 100644 node_modules/arr-union/index.js delete mode 100644 node_modules/arr-union/package.json delete mode 100755 node_modules/array-unique/LICENSE delete mode 100755 node_modules/array-unique/README.md delete mode 100644 node_modules/array-unique/index.js delete mode 100644 node_modules/array-unique/package.json delete mode 100644 node_modules/asn1/LICENSE delete mode 100644 node_modules/asn1/README.md delete mode 100644 node_modules/asn1/lib/ber/errors.js delete mode 100644 node_modules/asn1/lib/ber/index.js delete mode 100644 node_modules/asn1/lib/ber/reader.js delete mode 100644 node_modules/asn1/lib/ber/types.js delete mode 100644 node_modules/asn1/lib/ber/writer.js delete mode 100644 node_modules/asn1/lib/index.js delete mode 100644 node_modules/asn1/package.json delete mode 100644 node_modules/assert-plus/AUTHORS delete mode 100644 node_modules/assert-plus/CHANGES.md delete mode 100644 node_modules/assert-plus/README.md delete mode 100644 node_modules/assert-plus/assert.js delete mode 100644 node_modules/assert-plus/package.json delete mode 100644 node_modules/assign-symbols/LICENSE delete mode 100644 node_modules/assign-symbols/README.md delete mode 100644 node_modules/assign-symbols/index.js delete mode 100644 node_modules/assign-symbols/package.json delete mode 100644 node_modules/asynckit/LICENSE delete mode 100644 node_modules/asynckit/README.md delete mode 100644 node_modules/asynckit/bench.js delete mode 100644 node_modules/asynckit/index.js delete mode 100644 node_modules/asynckit/lib/abort.js delete mode 100644 node_modules/asynckit/lib/async.js delete mode 100644 node_modules/asynckit/lib/defer.js delete mode 100644 node_modules/asynckit/lib/iterate.js delete mode 100644 node_modules/asynckit/lib/readable_asynckit.js delete mode 100644 node_modules/asynckit/lib/readable_parallel.js delete mode 100644 node_modules/asynckit/lib/readable_serial.js delete mode 100644 node_modules/asynckit/lib/readable_serial_ordered.js delete mode 100644 node_modules/asynckit/lib/state.js delete mode 100644 node_modules/asynckit/lib/streamify.js delete mode 100644 node_modules/asynckit/lib/terminator.js delete mode 100644 node_modules/asynckit/package.json delete mode 100644 node_modules/asynckit/parallel.js delete mode 100644 node_modules/asynckit/serial.js delete mode 100644 node_modules/asynckit/serialOrdered.js delete mode 100644 node_modules/asynckit/stream.js delete mode 100644 node_modules/atob/LICENSE delete mode 100644 node_modules/atob/LICENSE.DOCS delete mode 100644 node_modules/atob/README.md delete mode 100755 node_modules/atob/bin/atob.js delete mode 100644 node_modules/atob/bower.json delete mode 100644 node_modules/atob/browser-atob.js delete mode 100644 node_modules/atob/node-atob.js delete mode 100644 node_modules/atob/package.json delete mode 100644 node_modules/atob/test.js delete mode 100644 node_modules/aws-sign2/LICENSE delete mode 100644 node_modules/aws-sign2/README.md delete mode 100644 node_modules/aws-sign2/index.js delete mode 100644 node_modules/aws-sign2/package.json delete mode 100644 node_modules/aws4/.github/FUNDING.yml delete mode 100644 node_modules/aws4/.travis.yml delete mode 100644 node_modules/aws4/LICENSE delete mode 100644 node_modules/aws4/README.md delete mode 100644 node_modules/aws4/aws4.js delete mode 100644 node_modules/aws4/lru.js delete mode 100644 node_modules/aws4/package.json delete mode 100644 node_modules/babel-jest/build/loadBabelConfig.d.ts delete mode 100644 node_modules/base/LICENSE delete mode 100644 node_modules/base/README.md delete mode 100644 node_modules/base/index.js delete mode 100644 node_modules/base/node_modules/define-property/LICENSE delete mode 100644 node_modules/base/node_modules/define-property/README.md delete mode 100644 node_modules/base/node_modules/define-property/index.js delete mode 100644 node_modules/base/node_modules/define-property/package.json delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/base/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/base/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-descriptor/package.json delete mode 100644 node_modules/base/package.json delete mode 100644 node_modules/bcrypt-pbkdf/CONTRIBUTING.md delete mode 100644 node_modules/bcrypt-pbkdf/LICENSE delete mode 100644 node_modules/bcrypt-pbkdf/README.md delete mode 100644 node_modules/bcrypt-pbkdf/index.js delete mode 100644 node_modules/bcrypt-pbkdf/package.json delete mode 100644 node_modules/browser-process-hrtime/LICENSE delete mode 100644 node_modules/browser-process-hrtime/README.md delete mode 100644 node_modules/browser-process-hrtime/index.d.ts delete mode 100644 node_modules/browser-process-hrtime/index.js delete mode 100644 node_modules/browser-process-hrtime/package.json delete mode 100644 node_modules/browserslist/CHANGELOG.md create mode 100644 node_modules/browserslist/parse.js delete mode 100644 node_modules/browserslist/update-db.js delete mode 100644 node_modules/cache-base/LICENSE delete mode 100644 node_modules/cache-base/README.md delete mode 100644 node_modules/cache-base/index.js delete mode 100644 node_modules/cache-base/package.json delete mode 100644 node_modules/caniuse-lite/CHANGELOG.md delete mode 100644 node_modules/caniuse-lite/data/features/async-iterations-and-generators.js delete mode 100644 node_modules/caniuse-lite/data/features/aux-click.js delete mode 100644 node_modules/caniuse-lite/data/features/clear-site-data-header.js create mode 100644 node_modules/caniuse-lite/data/features/colr-v1.js create mode 100644 node_modules/caniuse-lite/data/features/colr.js delete mode 100644 node_modules/caniuse-lite/data/features/css-apply-rule.js create mode 100644 node_modules/caniuse-lite/data/features/css-autofill.js create mode 100644 node_modules/caniuse-lite/data/features/css-cascade-layers.js create mode 100644 node_modules/caniuse-lite/data/features/css-container-queries-style.js create mode 100644 node_modules/caniuse-lite/data/features/css-container-queries.js create mode 100644 node_modules/caniuse-lite/data/features/css-container-query-units.js create mode 100644 node_modules/caniuse-lite/data/features/css-file-selector-button.js delete mode 100644 node_modules/caniuse-lite/data/features/css-focus-ring.js create mode 100644 node_modules/caniuse-lite/data/features/css-font-palette.js create mode 100644 node_modules/caniuse-lite/data/features/css-grid-animation.js delete mode 100644 node_modules/caniuse-lite/data/features/css-hyphenate.js create mode 100644 node_modules/caniuse-lite/data/features/css-lch-lab.js create mode 100644 node_modules/caniuse-lite/data/features/css-media-range-syntax.js create mode 100644 node_modules/caniuse-lite/data/features/css-nesting.js create mode 100644 node_modules/caniuse-lite/data/features/css-print-color-adjust.js create mode 100644 node_modules/caniuse-lite/data/features/css-relative-colors.js create mode 100644 node_modules/caniuse-lite/data/features/css-text-box-trim.js delete mode 100644 node_modules/caniuse-lite/data/features/css-touch-action-2.js create mode 100644 node_modules/caniuse-lite/data/features/css-when-else.js create mode 100644 node_modules/caniuse-lite/data/features/css-width-stretch.js create mode 100644 node_modules/caniuse-lite/data/features/declarative-shadow-dom.js create mode 100644 node_modules/caniuse-lite/data/features/decorators.js delete mode 100644 node_modules/caniuse-lite/data/features/domfocusin-domfocusout-events.js delete mode 100644 node_modules/caniuse-lite/data/features/es6-module-nomodule.js delete mode 100644 node_modules/caniuse-lite/data/features/focusoptions-preventscroll.js delete mode 100644 node_modules/caniuse-lite/data/features/font-metrics-overrides.js delete mode 100644 node_modules/caniuse-lite/data/features/font-variant-east-asian.js delete mode 100644 node_modules/caniuse-lite/data/features/internationalization-plural-rul.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js create mode 100644 node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js delete mode 100644 node_modules/caniuse-lite/data/features/media-attribute.js delete mode 100644 node_modules/caniuse-lite/data/features/media-session-api.js delete mode 100644 node_modules/caniuse-lite/data/features/navigator-language.js delete mode 100644 node_modules/caniuse-lite/data/features/node-contains.js delete mode 100644 node_modules/caniuse-lite/data/features/node-parentelement.js delete mode 100644 node_modules/caniuse-lite/data/features/private-class-fields.js delete mode 100644 node_modules/caniuse-lite/data/features/private-methods-and-accessors.js delete mode 100644 node_modules/caniuse-lite/data/features/public-class-fields.js delete mode 100644 node_modules/caniuse-lite/data/features/replace-all.js delete mode 100644 node_modules/caniuse-lite/data/features/sha-2.js delete mode 100644 node_modules/caniuse-lite/data/features/stopimmediatepropagation.js create mode 100644 node_modules/caniuse-lite/data/features/subresource-bundling.js delete mode 100644 node_modules/caniuse-lite/data/features/symbols.js create mode 100644 node_modules/caniuse-lite/data/features/temporal.js delete mode 100644 node_modules/caniuse-lite/data/features/text-underline-offset.js delete mode 100644 node_modules/caniuse-lite/data/features/token-binding.js create mode 100644 node_modules/caniuse-lite/data/features/vector-effect.js create mode 100644 node_modules/caniuse-lite/data/features/viewport-unit-variants.js create mode 100644 node_modules/caniuse-lite/data/features/webcodecs.js create mode 100644 node_modules/caniuse-lite/data/features/webkit-user-drag.js create mode 100644 node_modules/caniuse-lite/data/features/webtransport.js delete mode 100644 node_modules/caniuse-lite/data/regions/AN.js delete mode 100644 node_modules/capture-exit/README.md delete mode 100644 node_modules/capture-exit/index.js delete mode 100644 node_modules/capture-exit/package.json delete mode 100644 node_modules/caseless/LICENSE delete mode 100644 node_modules/caseless/README.md delete mode 100644 node_modules/caseless/index.js delete mode 100644 node_modules/caseless/package.json delete mode 100644 node_modules/caseless/test.js create mode 100644 node_modules/ci-info/index.d.ts delete mode 100644 node_modules/class-utils/LICENSE delete mode 100644 node_modules/class-utils/README.md delete mode 100644 node_modules/class-utils/index.js delete mode 100644 node_modules/class-utils/node_modules/define-property/LICENSE delete mode 100644 node_modules/class-utils/node_modules/define-property/README.md delete mode 100644 node_modules/class-utils/node_modules/define-property/index.js delete mode 100644 node_modules/class-utils/node_modules/define-property/package.json delete mode 100644 node_modules/class-utils/package.json create mode 100644 node_modules/cliui/build/index.cjs create mode 100644 node_modules/cliui/build/index.d.cts create mode 100644 node_modules/cliui/build/lib/index.js create mode 100644 node_modules/cliui/build/lib/string-utils.js delete mode 100644 node_modules/cliui/index.js create mode 100644 node_modules/cliui/index.mjs delete mode 100644 node_modules/collection-visit/LICENSE delete mode 100644 node_modules/collection-visit/README.md delete mode 100644 node_modules/collection-visit/index.js delete mode 100644 node_modules/collection-visit/package.json delete mode 100644 node_modules/colorette/LICENSE.md delete mode 100644 node_modules/colorette/README.md delete mode 100644 node_modules/colorette/index.cjs delete mode 100644 node_modules/colorette/index.d.ts delete mode 100644 node_modules/colorette/index.js delete mode 100644 node_modules/colorette/package.json delete mode 100644 node_modules/combined-stream/License delete mode 100644 node_modules/combined-stream/Readme.md delete mode 100644 node_modules/combined-stream/lib/combined_stream.js delete mode 100644 node_modules/combined-stream/package.json delete mode 100644 node_modules/combined-stream/yarn.lock delete mode 100644 node_modules/component-emitter/History.md delete mode 100644 node_modules/component-emitter/LICENSE delete mode 100644 node_modules/component-emitter/Readme.md delete mode 100644 node_modules/component-emitter/index.js delete mode 100644 node_modules/component-emitter/package.json delete mode 100644 node_modules/copy-descriptor/LICENSE delete mode 100644 node_modules/copy-descriptor/index.js delete mode 100644 node_modules/copy-descriptor/package.json delete mode 100644 node_modules/core-util-is/LICENSE delete mode 100644 node_modules/core-util-is/README.md delete mode 100644 node_modules/core-util-is/float.patch delete mode 100644 node_modules/core-util-is/lib/util.js delete mode 100644 node_modules/core-util-is/package.json delete mode 100644 node_modules/core-util-is/test.js delete mode 100644 node_modules/cssom/LICENSE.txt delete mode 100644 node_modules/cssom/README.mdown delete mode 100644 node_modules/cssom/lib/CSSDocumentRule.js delete mode 100644 node_modules/cssom/lib/CSSFontFaceRule.js delete mode 100644 node_modules/cssom/lib/CSSHostRule.js delete mode 100644 node_modules/cssom/lib/CSSImportRule.js delete mode 100644 node_modules/cssom/lib/CSSKeyframeRule.js delete mode 100644 node_modules/cssom/lib/CSSKeyframesRule.js delete mode 100644 node_modules/cssom/lib/CSSMediaRule.js delete mode 100644 node_modules/cssom/lib/CSSOM.js delete mode 100644 node_modules/cssom/lib/CSSRule.js delete mode 100644 node_modules/cssom/lib/CSSStyleDeclaration.js delete mode 100644 node_modules/cssom/lib/CSSStyleRule.js delete mode 100644 node_modules/cssom/lib/CSSStyleSheet.js delete mode 100644 node_modules/cssom/lib/CSSSupportsRule.js delete mode 100644 node_modules/cssom/lib/CSSValue.js delete mode 100644 node_modules/cssom/lib/CSSValueExpression.js delete mode 100644 node_modules/cssom/lib/MatcherList.js delete mode 100644 node_modules/cssom/lib/MediaList.js delete mode 100644 node_modules/cssom/lib/StyleSheet.js delete mode 100644 node_modules/cssom/lib/clone.js delete mode 100644 node_modules/cssom/lib/index.js delete mode 100644 node_modules/cssom/lib/parse.js delete mode 100644 node_modules/cssom/package.json delete mode 100644 node_modules/cssstyle/LICENSE delete mode 100644 node_modules/cssstyle/README.md delete mode 100644 node_modules/cssstyle/lib/CSSStyleDeclaration.js delete mode 100644 node_modules/cssstyle/lib/CSSStyleDeclaration.test.js delete mode 100644 node_modules/cssstyle/lib/allExtraProperties.js delete mode 100644 node_modules/cssstyle/lib/allProperties.js delete mode 100644 node_modules/cssstyle/lib/allWebkitProperties.js delete mode 100644 node_modules/cssstyle/lib/constants.js delete mode 100644 node_modules/cssstyle/lib/implementedProperties.js delete mode 100644 node_modules/cssstyle/lib/named_colors.json delete mode 100644 node_modules/cssstyle/lib/parsers.js delete mode 100644 node_modules/cssstyle/lib/parsers.test.js delete mode 100644 node_modules/cssstyle/lib/properties.js delete mode 100644 node_modules/cssstyle/lib/properties/azimuth.js delete mode 100644 node_modules/cssstyle/lib/properties/background.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundAttachment.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundColor.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundImage.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundPosition.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundRepeat.js delete mode 100644 node_modules/cssstyle/lib/properties/border.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/borderColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRight.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/borderStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTop.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/bottom.js delete mode 100644 node_modules/cssstyle/lib/properties/clear.js delete mode 100644 node_modules/cssstyle/lib/properties/clip.js delete mode 100644 node_modules/cssstyle/lib/properties/color.js delete mode 100644 node_modules/cssstyle/lib/properties/cssFloat.js delete mode 100644 node_modules/cssstyle/lib/properties/flex.js delete mode 100644 node_modules/cssstyle/lib/properties/flexBasis.js delete mode 100644 node_modules/cssstyle/lib/properties/flexGrow.js delete mode 100644 node_modules/cssstyle/lib/properties/flexShrink.js delete mode 100644 node_modules/cssstyle/lib/properties/float.js delete mode 100644 node_modules/cssstyle/lib/properties/floodColor.js delete mode 100644 node_modules/cssstyle/lib/properties/font.js delete mode 100644 node_modules/cssstyle/lib/properties/fontFamily.js delete mode 100644 node_modules/cssstyle/lib/properties/fontSize.js delete mode 100644 node_modules/cssstyle/lib/properties/fontStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/fontVariant.js delete mode 100644 node_modules/cssstyle/lib/properties/fontWeight.js delete mode 100644 node_modules/cssstyle/lib/properties/height.js delete mode 100644 node_modules/cssstyle/lib/properties/left.js delete mode 100644 node_modules/cssstyle/lib/properties/lightingColor.js delete mode 100644 node_modules/cssstyle/lib/properties/lineHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/margin.js delete mode 100644 node_modules/cssstyle/lib/properties/marginBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/marginLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/marginRight.js delete mode 100644 node_modules/cssstyle/lib/properties/marginTop.js delete mode 100644 node_modules/cssstyle/lib/properties/opacity.js delete mode 100644 node_modules/cssstyle/lib/properties/outlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/padding.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingRight.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingTop.js delete mode 100644 node_modules/cssstyle/lib/properties/right.js delete mode 100644 node_modules/cssstyle/lib/properties/stopColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThroughColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/top.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEndColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStartColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextFillColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js delete mode 100644 node_modules/cssstyle/lib/properties/width.js delete mode 100644 node_modules/cssstyle/lib/utils/colorSpace.js delete mode 100644 node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/LICENSE.txt delete mode 100644 node_modules/cssstyle/node_modules/cssom/README.mdown delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSValue.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/CSSValueExpression.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/MediaList.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/StyleSheet.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/clone.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/index.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/lib/parse.js delete mode 100644 node_modules/cssstyle/node_modules/cssom/package.json delete mode 100644 node_modules/cssstyle/package.json delete mode 100644 node_modules/dashdash/CHANGES.md delete mode 100644 node_modules/dashdash/LICENSE.txt delete mode 100644 node_modules/dashdash/README.md delete mode 100644 node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 node_modules/dashdash/lib/dashdash.js delete mode 100644 node_modules/dashdash/package.json delete mode 100644 node_modules/data-urls/LICENSE.txt delete mode 100644 node_modules/data-urls/README.md delete mode 100644 node_modules/data-urls/lib/parser.js delete mode 100644 node_modules/data-urls/lib/utils.js delete mode 100644 node_modules/data-urls/package.json delete mode 100644 node_modules/decamelize/index.js delete mode 100644 node_modules/decamelize/license delete mode 100644 node_modules/decamelize/package.json delete mode 100644 node_modules/decamelize/readme.md delete mode 100644 node_modules/decimal.js/CHANGELOG.md delete mode 100644 node_modules/decimal.js/LICENCE.md delete mode 100644 node_modules/decimal.js/README.md delete mode 100644 node_modules/decimal.js/decimal.d.ts delete mode 100644 node_modules/decimal.js/decimal.global.d.ts delete mode 100644 node_modules/decimal.js/decimal.js delete mode 100644 node_modules/decimal.js/decimal.min.js delete mode 100644 node_modules/decimal.js/decimal.min.js.map delete mode 100644 node_modules/decimal.js/decimal.mjs delete mode 100644 node_modules/decimal.js/doc/API.html delete mode 100644 node_modules/decimal.js/package.json delete mode 100644 node_modules/decode-uri-component/index.js delete mode 100644 node_modules/decode-uri-component/license delete mode 100644 node_modules/decode-uri-component/package.json delete mode 100644 node_modules/decode-uri-component/readme.md create mode 100644 node_modules/dedent/LICENSE create mode 100644 node_modules/dedent/README.md create mode 100644 node_modules/dedent/dist/dedent.js create mode 100644 node_modules/dedent/package.json create mode 100644 node_modules/deepmerge/.editorconfig create mode 100644 node_modules/deepmerge/.eslintcache delete mode 100644 node_modules/define-property/CHANGELOG.md delete mode 100644 node_modules/define-property/LICENSE delete mode 100644 node_modules/define-property/README.md delete mode 100644 node_modules/define-property/index.js delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/define-property/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-descriptor/package.json delete mode 100644 node_modules/define-property/package.json delete mode 100644 node_modules/delayed-stream/.npmignore delete mode 100644 node_modules/delayed-stream/License delete mode 100644 node_modules/delayed-stream/Makefile delete mode 100644 node_modules/delayed-stream/Readme.md delete mode 100644 node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 node_modules/delayed-stream/package.json delete mode 100644 node_modules/diff-sequences/perf/example.md delete mode 100644 node_modules/diff-sequences/perf/index.js delete mode 100644 node_modules/domexception/LICENSE.txt delete mode 100644 node_modules/domexception/README.md delete mode 100644 node_modules/domexception/index.js delete mode 100644 node_modules/domexception/lib/DOMException-impl.js delete mode 100644 node_modules/domexception/lib/DOMException.js delete mode 100644 node_modules/domexception/lib/legacy-error-codes.json delete mode 100644 node_modules/domexception/lib/utils.js delete mode 100644 node_modules/domexception/node_modules/webidl-conversions/LICENSE.md delete mode 100644 node_modules/domexception/node_modules/webidl-conversions/README.md delete mode 100644 node_modules/domexception/node_modules/webidl-conversions/lib/index.js delete mode 100644 node_modules/domexception/node_modules/webidl-conversions/package.json delete mode 100644 node_modules/domexception/package.json delete mode 100644 node_modules/domexception/webidl2js-wrapper.js delete mode 100755 node_modules/ecc-jsbn/LICENSE delete mode 100755 node_modules/ecc-jsbn/README.md delete mode 100755 node_modules/ecc-jsbn/index.js delete mode 100755 node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100755 node_modules/ecc-jsbn/lib/ec.js delete mode 100755 node_modules/ecc-jsbn/lib/sec.js delete mode 100755 node_modules/ecc-jsbn/package.json delete mode 100755 node_modules/ecc-jsbn/test.js create mode 100644 node_modules/electron-to-chromium/chromium-versions.json create mode 100644 node_modules/electron-to-chromium/full-chromium-versions.json create mode 100644 node_modules/electron-to-chromium/full-versions.json create mode 100644 node_modules/electron-to-chromium/versions.json create mode 100644 node_modules/emittery/maps.js delete mode 100644 node_modules/end-of-stream/LICENSE delete mode 100644 node_modules/end-of-stream/README.md delete mode 100644 node_modules/end-of-stream/index.js delete mode 100644 node_modules/end-of-stream/package.json delete mode 100644 node_modules/escodegen/LICENSE.BSD delete mode 100644 node_modules/escodegen/README.md delete mode 100755 node_modules/escodegen/bin/escodegen.js delete mode 100755 node_modules/escodegen/bin/esgenerate.js delete mode 100644 node_modules/escodegen/escodegen.js delete mode 100644 node_modules/escodegen/node_modules/estraverse/.jshintrc delete mode 100644 node_modules/escodegen/node_modules/estraverse/LICENSE.BSD delete mode 100644 node_modules/escodegen/node_modules/estraverse/README.md delete mode 100644 node_modules/escodegen/node_modules/estraverse/estraverse.js delete mode 100644 node_modules/escodegen/node_modules/estraverse/gulpfile.js delete mode 100644 node_modules/escodegen/node_modules/estraverse/package.json delete mode 100644 node_modules/escodegen/node_modules/levn/LICENSE delete mode 100644 node_modules/escodegen/node_modules/levn/README.md delete mode 100644 node_modules/escodegen/node_modules/levn/lib/cast.js delete mode 100644 node_modules/escodegen/node_modules/levn/lib/coerce.js delete mode 100644 node_modules/escodegen/node_modules/levn/lib/index.js delete mode 100644 node_modules/escodegen/node_modules/levn/lib/parse-string.js delete mode 100644 node_modules/escodegen/node_modules/levn/lib/parse.js delete mode 100644 node_modules/escodegen/node_modules/levn/package.json delete mode 100644 node_modules/escodegen/node_modules/optionator/CHANGELOG.md delete mode 100644 node_modules/escodegen/node_modules/optionator/LICENSE delete mode 100644 node_modules/escodegen/node_modules/optionator/README.md delete mode 100644 node_modules/escodegen/node_modules/optionator/lib/help.js delete mode 100644 node_modules/escodegen/node_modules/optionator/lib/index.js delete mode 100644 node_modules/escodegen/node_modules/optionator/lib/util.js delete mode 100644 node_modules/escodegen/node_modules/optionator/package.json delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/CHANGELOG.md delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/LICENSE delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/README.md delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/Func.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/List.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/Num.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/Obj.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/Str.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/lib/index.js delete mode 100644 node_modules/escodegen/node_modules/prelude-ls/package.json delete mode 100644 node_modules/escodegen/node_modules/type-check/LICENSE delete mode 100644 node_modules/escodegen/node_modules/type-check/README.md delete mode 100644 node_modules/escodegen/node_modules/type-check/lib/check.js delete mode 100644 node_modules/escodegen/node_modules/type-check/lib/index.js delete mode 100644 node_modules/escodegen/node_modules/type-check/lib/parse-type.js delete mode 100644 node_modules/escodegen/node_modules/type-check/package.json delete mode 100644 node_modules/escodegen/package.json delete mode 100644 node_modules/exec-sh/.jshintrc delete mode 100644 node_modules/exec-sh/.travis.yml delete mode 100644 node_modules/exec-sh/LICENSE delete mode 100644 node_modules/exec-sh/README.md delete mode 100644 node_modules/exec-sh/example/example.js delete mode 100644 node_modules/exec-sh/lib/exec-sh.js delete mode 100644 node_modules/exec-sh/package.json delete mode 100644 node_modules/exec-sh/test/exec-sh.js create mode 100644 node_modules/execa/index.d.ts create mode 100644 node_modules/execa/lib/command.js delete mode 100644 node_modules/execa/lib/errname.js create mode 100644 node_modules/execa/lib/error.js rename node_modules/{jest-changed-files/node_modules => }/execa/lib/kill.js (95%) rename node_modules/{jest-changed-files/node_modules => }/execa/lib/promise.js (100%) create mode 100644 node_modules/execa/lib/stream.js delete mode 120000 node_modules/execa/node_modules/.bin/semver delete mode 120000 node_modules/execa/node_modules/.bin/which delete mode 100644 node_modules/execa/node_modules/cross-spawn/CHANGELOG.md delete mode 100644 node_modules/execa/node_modules/cross-spawn/LICENSE delete mode 100644 node_modules/execa/node_modules/cross-spawn/README.md delete mode 100644 node_modules/execa/node_modules/cross-spawn/index.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/lib/enoent.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/lib/parse.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/lib/util/escape.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js delete mode 100644 node_modules/execa/node_modules/cross-spawn/package.json delete mode 100644 node_modules/execa/node_modules/path-key/index.js delete mode 100644 node_modules/execa/node_modules/path-key/license delete mode 100644 node_modules/execa/node_modules/path-key/package.json delete mode 100644 node_modules/execa/node_modules/path-key/readme.md delete mode 100644 node_modules/execa/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/execa/node_modules/semver/README.md delete mode 100755 node_modules/execa/node_modules/semver/bin/semver delete mode 100644 node_modules/execa/node_modules/semver/package.json delete mode 100644 node_modules/execa/node_modules/semver/range.bnf delete mode 100644 node_modules/execa/node_modules/semver/semver.js delete mode 100644 node_modules/execa/node_modules/shebang-command/index.js delete mode 100644 node_modules/execa/node_modules/shebang-command/license delete mode 100644 node_modules/execa/node_modules/shebang-command/package.json delete mode 100644 node_modules/execa/node_modules/shebang-command/readme.md delete mode 100644 node_modules/execa/node_modules/shebang-regex/index.js delete mode 100644 node_modules/execa/node_modules/shebang-regex/license delete mode 100644 node_modules/execa/node_modules/shebang-regex/package.json delete mode 100644 node_modules/execa/node_modules/shebang-regex/readme.md delete mode 100644 node_modules/execa/node_modules/which/CHANGELOG.md delete mode 100644 node_modules/execa/node_modules/which/README.md delete mode 100755 node_modules/execa/node_modules/which/bin/which delete mode 100644 node_modules/execa/node_modules/which/package.json delete mode 100644 node_modules/execa/node_modules/which/which.js delete mode 100644 node_modules/expand-brackets/LICENSE delete mode 100644 node_modules/expand-brackets/README.md delete mode 100644 node_modules/expand-brackets/changelog.md delete mode 100644 node_modules/expand-brackets/index.js delete mode 100644 node_modules/expand-brackets/lib/compilers.js delete mode 100644 node_modules/expand-brackets/lib/parsers.js delete mode 100644 node_modules/expand-brackets/lib/utils.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/expand-brackets/node_modules/debug/.eslintrc delete mode 100644 node_modules/expand-brackets/node_modules/debug/.npmignore delete mode 100644 node_modules/expand-brackets/node_modules/debug/.travis.yml delete mode 100644 node_modules/expand-brackets/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/expand-brackets/node_modules/debug/LICENSE delete mode 100644 node_modules/expand-brackets/node_modules/debug/Makefile delete mode 100644 node_modules/expand-brackets/node_modules/debug/README.md delete mode 100644 node_modules/expand-brackets/node_modules/debug/component.json delete mode 100644 node_modules/expand-brackets/node_modules/debug/karma.conf.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/node.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/package.json delete mode 100644 node_modules/expand-brackets/node_modules/debug/src/browser.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/src/debug.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/src/index.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/src/inspector-log.js delete mode 100644 node_modules/expand-brackets/node_modules/debug/src/node.js delete mode 100644 node_modules/expand-brackets/node_modules/define-property/LICENSE delete mode 100644 node_modules/expand-brackets/node_modules/define-property/README.md delete mode 100644 node_modules/expand-brackets/node_modules/define-property/index.js delete mode 100644 node_modules/expand-brackets/node_modules/define-property/package.json delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/README.md delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/index.js delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/package.json delete mode 100644 node_modules/expand-brackets/node_modules/ms/index.js delete mode 100644 node_modules/expand-brackets/node_modules/ms/license.md delete mode 100644 node_modules/expand-brackets/node_modules/ms/package.json delete mode 100644 node_modules/expand-brackets/node_modules/ms/readme.md delete mode 100644 node_modules/expand-brackets/package.json delete mode 100644 node_modules/expect/build/asymmetricMatchers.d.ts delete mode 100644 node_modules/expect/build/extractExpectedAssertionsErrors.d.ts delete mode 100644 node_modules/expect/build/jasmineUtils.d.ts delete mode 100644 node_modules/expect/build/jasmineUtils.js delete mode 100644 node_modules/expect/build/jestMatchersObject.d.ts delete mode 100644 node_modules/expect/build/matchers.d.ts delete mode 100644 node_modules/expect/build/print.d.ts delete mode 100644 node_modules/expect/build/spyMatchers.d.ts delete mode 100644 node_modules/expect/build/toThrowMatchers.d.ts delete mode 100644 node_modules/expect/build/types.d.ts delete mode 100644 node_modules/expect/build/utils.d.ts delete mode 100644 node_modules/expect/build/utils.js delete mode 100644 node_modules/expect/node_modules/ansi-styles/index.d.ts delete mode 100644 node_modules/expect/node_modules/ansi-styles/index.js delete mode 100644 node_modules/expect/node_modules/ansi-styles/package.json delete mode 100644 node_modules/expect/node_modules/ansi-styles/readme.md delete mode 100644 node_modules/expect/node_modules/color-convert/CHANGELOG.md delete mode 100644 node_modules/expect/node_modules/color-convert/LICENSE delete mode 100644 node_modules/expect/node_modules/color-convert/README.md delete mode 100644 node_modules/expect/node_modules/color-convert/conversions.js delete mode 100644 node_modules/expect/node_modules/color-convert/index.js delete mode 100644 node_modules/expect/node_modules/color-convert/package.json delete mode 100644 node_modules/expect/node_modules/color-convert/route.js delete mode 100644 node_modules/expect/node_modules/color-name/LICENSE delete mode 100644 node_modules/expect/node_modules/color-name/README.md delete mode 100644 node_modules/expect/node_modules/color-name/index.js delete mode 100644 node_modules/expect/node_modules/color-name/package.json delete mode 100644 node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/extend-shallow/README.md delete mode 100644 node_modules/extend-shallow/index.js delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/LICENSE delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/README.md delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.d.ts delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.js delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/package.json delete mode 100644 node_modules/extend-shallow/node_modules/is-plain-object/LICENSE delete mode 100644 node_modules/extend-shallow/node_modules/is-plain-object/README.md delete mode 100644 node_modules/extend-shallow/node_modules/is-plain-object/index.d.ts delete mode 100644 node_modules/extend-shallow/node_modules/is-plain-object/index.js delete mode 100644 node_modules/extend-shallow/node_modules/is-plain-object/package.json delete mode 100644 node_modules/extend-shallow/package.json delete mode 100644 node_modules/extend/.editorconfig delete mode 100644 node_modules/extend/.eslintrc delete mode 100644 node_modules/extend/.jscs.json delete mode 100644 node_modules/extend/.travis.yml delete mode 100644 node_modules/extend/CHANGELOG.md delete mode 100644 node_modules/extend/LICENSE delete mode 100644 node_modules/extend/README.md delete mode 100644 node_modules/extend/component.json delete mode 100644 node_modules/extend/index.js delete mode 100644 node_modules/extend/package.json delete mode 100644 node_modules/extglob/LICENSE delete mode 100644 node_modules/extglob/README.md delete mode 100644 node_modules/extglob/changelog.md delete mode 100644 node_modules/extglob/index.js delete mode 100644 node_modules/extglob/lib/compilers.js delete mode 100644 node_modules/extglob/lib/extglob.js delete mode 100644 node_modules/extglob/lib/parsers.js delete mode 100644 node_modules/extglob/lib/utils.js delete mode 100644 node_modules/extglob/node_modules/define-property/LICENSE delete mode 100644 node_modules/extglob/node_modules/define-property/README.md delete mode 100644 node_modules/extglob/node_modules/define-property/index.js delete mode 100644 node_modules/extglob/node_modules/define-property/package.json delete mode 100644 node_modules/extglob/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/extglob/node_modules/extend-shallow/README.md delete mode 100644 node_modules/extglob/node_modules/extend-shallow/index.js delete mode 100644 node_modules/extglob/node_modules/extend-shallow/package.json delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/extglob/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-descriptor/package.json delete mode 100644 node_modules/extglob/package.json delete mode 100644 node_modules/extsprintf/.gitmodules delete mode 100644 node_modules/extsprintf/.npmignore delete mode 100644 node_modules/extsprintf/LICENSE delete mode 100644 node_modules/extsprintf/Makefile delete mode 100644 node_modules/extsprintf/Makefile.targ delete mode 100644 node_modules/extsprintf/README.md delete mode 100644 node_modules/extsprintf/jsl.node.conf delete mode 100644 node_modules/extsprintf/lib/extsprintf.js delete mode 100644 node_modules/extsprintf/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/forever-agent/LICENSE delete mode 100644 node_modules/forever-agent/README.md delete mode 100644 node_modules/forever-agent/index.js delete mode 100644 node_modules/forever-agent/package.json delete mode 100644 node_modules/form-data/License delete mode 100644 node_modules/form-data/README.md delete mode 100644 node_modules/form-data/README.md.bak delete mode 100644 node_modules/form-data/lib/browser.js delete mode 100644 node_modules/form-data/lib/form_data.js delete mode 100644 node_modules/form-data/lib/populate.js delete mode 100644 node_modules/form-data/package.json delete mode 100644 node_modules/form-data/yarn.lock delete mode 100644 node_modules/fragment-cache/LICENSE delete mode 100644 node_modules/fragment-cache/README.md delete mode 100644 node_modules/fragment-cache/index.js delete mode 100644 node_modules/fragment-cache/package.json create mode 100644 node_modules/get-stream/index.d.ts delete mode 100644 node_modules/get-value/LICENSE delete mode 100644 node_modules/get-value/index.js delete mode 100644 node_modules/get-value/package.json delete mode 100644 node_modules/getpass/.npmignore delete mode 100644 node_modules/getpass/.travis.yml delete mode 100644 node_modules/getpass/LICENSE delete mode 100644 node_modules/getpass/README.md delete mode 100644 node_modules/getpass/lib/index.js delete mode 100644 node_modules/getpass/package.json delete mode 100644 node_modules/growly/HISTORY.md delete mode 100644 node_modules/growly/README.md delete mode 100644 node_modules/growly/example/bakery.js delete mode 100644 node_modules/growly/example/cake.png delete mode 100644 node_modules/growly/example/muffin.png delete mode 100644 node_modules/growly/example/simple.js delete mode 100644 node_modules/growly/lib/gntp.js delete mode 100644 node_modules/growly/lib/growly.js delete mode 100644 node_modules/growly/package.json delete mode 100644 node_modules/har-schema/LICENSE delete mode 100644 node_modules/har-schema/README.md delete mode 100644 node_modules/har-schema/lib/afterRequest.json delete mode 100644 node_modules/har-schema/lib/beforeRequest.json delete mode 100644 node_modules/har-schema/lib/browser.json delete mode 100644 node_modules/har-schema/lib/cache.json delete mode 100644 node_modules/har-schema/lib/content.json delete mode 100644 node_modules/har-schema/lib/cookie.json delete mode 100644 node_modules/har-schema/lib/creator.json delete mode 100644 node_modules/har-schema/lib/entry.json delete mode 100644 node_modules/har-schema/lib/har.json delete mode 100644 node_modules/har-schema/lib/header.json delete mode 100644 node_modules/har-schema/lib/index.js delete mode 100644 node_modules/har-schema/lib/log.json delete mode 100644 node_modules/har-schema/lib/page.json delete mode 100644 node_modules/har-schema/lib/pageTimings.json delete mode 100644 node_modules/har-schema/lib/postData.json delete mode 100644 node_modules/har-schema/lib/query.json delete mode 100644 node_modules/har-schema/lib/request.json delete mode 100644 node_modules/har-schema/lib/response.json delete mode 100644 node_modules/har-schema/lib/timings.json delete mode 100644 node_modules/har-schema/package.json delete mode 100644 node_modules/har-validator/LICENSE delete mode 100644 node_modules/har-validator/README.md delete mode 100644 node_modules/har-validator/lib/async.js delete mode 100644 node_modules/har-validator/lib/error.js delete mode 100644 node_modules/har-validator/lib/promise.js delete mode 100644 node_modules/har-validator/package.json delete mode 100644 node_modules/has-value/LICENSE delete mode 100644 node_modules/has-value/README.md delete mode 100644 node_modules/has-value/index.js delete mode 100644 node_modules/has-value/package.json delete mode 100644 node_modules/has-values/LICENSE delete mode 100644 node_modules/has-values/README.md delete mode 100644 node_modules/has-values/index.js delete mode 100644 node_modules/has-values/node_modules/is-number/LICENSE delete mode 100644 node_modules/has-values/node_modules/is-number/README.md delete mode 100644 node_modules/has-values/node_modules/is-number/index.js delete mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/LICENSE delete mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/README.md delete mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/index.js delete mode 100644 node_modules/has-values/node_modules/is-number/node_modules/kind-of/package.json delete mode 100644 node_modules/has-values/node_modules/is-number/package.json delete mode 100644 node_modules/has-values/node_modules/kind-of/LICENSE delete mode 100644 node_modules/has-values/node_modules/kind-of/README.md delete mode 100644 node_modules/has-values/node_modules/kind-of/index.js delete mode 100644 node_modules/has-values/node_modules/kind-of/package.json delete mode 100644 node_modules/has-values/package.json delete mode 100644 node_modules/hosted-git-info/CHANGELOG.md delete mode 100644 node_modules/hosted-git-info/LICENSE delete mode 100644 node_modules/hosted-git-info/README.md delete mode 100644 node_modules/hosted-git-info/git-host-info.js delete mode 100644 node_modules/hosted-git-info/git-host.js delete mode 100644 node_modules/hosted-git-info/index.js delete mode 100644 node_modules/hosted-git-info/package.json delete mode 100644 node_modules/html-encoding-sniffer/LICENSE.txt delete mode 100644 node_modules/html-encoding-sniffer/README.md delete mode 100644 node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js delete mode 100644 node_modules/html-encoding-sniffer/package.json delete mode 100644 node_modules/http-signature/.dir-locals.el delete mode 100644 node_modules/http-signature/.npmignore delete mode 100644 node_modules/http-signature/CHANGES.md delete mode 100644 node_modules/http-signature/LICENSE delete mode 100644 node_modules/http-signature/README.md delete mode 100644 node_modules/http-signature/http_signing.md delete mode 100644 node_modules/http-signature/lib/index.js delete mode 100644 node_modules/http-signature/lib/parser.js delete mode 100644 node_modules/http-signature/lib/signer.js delete mode 100644 node_modules/http-signature/lib/utils.js delete mode 100644 node_modules/http-signature/lib/verify.js delete mode 100644 node_modules/http-signature/package.json create mode 100644 node_modules/human-signals/build/src/main.d.ts delete mode 100644 node_modules/iconv-lite/Changelog.md delete mode 100644 node_modules/iconv-lite/LICENSE delete mode 100644 node_modules/iconv-lite/README.md delete mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/index.js delete mode 100644 node_modules/iconv-lite/encodings/internal.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 node_modules/iconv-lite/encodings/utf16.js delete mode 100644 node_modules/iconv-lite/encodings/utf7.js delete mode 100644 node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 node_modules/iconv-lite/lib/extend-node.js delete mode 100644 node_modules/iconv-lite/lib/index.d.ts delete mode 100644 node_modules/iconv-lite/lib/index.js delete mode 100644 node_modules/iconv-lite/lib/streams.js delete mode 100644 node_modules/iconv-lite/package.json delete mode 100644 node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-accessor-descriptor/package.json 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-ci/CHANGELOG.md delete mode 100644 node_modules/is-ci/LICENSE delete mode 100644 node_modules/is-ci/README.md delete mode 100755 node_modules/is-ci/bin.js delete mode 100644 node_modules/is-ci/index.js delete mode 100644 node_modules/is-ci/package.json delete mode 100644 node_modules/is-core-module/.eslintignore delete mode 100644 node_modules/is-core-module/.github/FUNDING.yml delete mode 100644 node_modules/is-core-module/.github/workflows/node-4+.yml delete mode 100644 node_modules/is-core-module/.github/workflows/node-iojs.yml delete mode 100644 node_modules/is-core-module/.github/workflows/node-pretest.yml delete mode 100644 node_modules/is-core-module/.github/workflows/node-zero.yml delete mode 100644 node_modules/is-core-module/.github/workflows/rebase.yml delete mode 100644 node_modules/is-core-module/.github/workflows/require-allow-edits.yml delete mode 100644 node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/is-descriptor/README.md delete mode 100644 node_modules/is-descriptor/index.js delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-descriptor/package.json delete mode 100755 node_modules/is-docker/cli.js delete mode 100644 node_modules/is-docker/index.d.ts delete mode 100644 node_modules/is-docker/index.js delete mode 100644 node_modules/is-docker/package.json delete mode 100644 node_modules/is-docker/readme.md 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-potential-custom-element-name/LICENSE-MIT.txt delete mode 100755 node_modules/is-potential-custom-element-name/index.js delete mode 100644 node_modules/is-potential-custom-element-name/package.json create mode 100644 node_modules/is-stream/index.d.ts delete mode 100644 node_modules/is-typedarray/LICENSE.md delete mode 100644 node_modules/is-typedarray/README.md delete mode 100644 node_modules/is-typedarray/index.js delete mode 100644 node_modules/is-typedarray/package.json delete mode 100644 node_modules/is-typedarray/test.js delete mode 100644 node_modules/is-windows/LICENSE delete mode 100644 node_modules/is-windows/README.md delete mode 100644 node_modules/is-windows/index.js delete mode 100644 node_modules/is-windows/package.json delete mode 100644 node_modules/is-wsl/index.d.ts delete mode 100644 node_modules/is-wsl/index.js delete mode 100644 node_modules/is-wsl/license delete mode 100644 node_modules/is-wsl/package.json delete mode 100644 node_modules/is-wsl/readme.md 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.d.ts delete mode 100644 node_modules/isobject/index.js delete mode 100644 node_modules/isobject/package.json delete mode 100644 node_modules/isstream/.jshintrc delete mode 100644 node_modules/isstream/.npmignore delete mode 100644 node_modules/isstream/.travis.yml delete mode 100644 node_modules/isstream/LICENSE.md delete mode 100644 node_modules/isstream/README.md delete mode 100644 node_modules/isstream/isstream.js delete mode 100644 node_modules/isstream/package.json delete mode 100644 node_modules/isstream/test.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/constants.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/index.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/instrumenter.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/read-coverage.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/source-coverage.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/visitor.js create mode 100644 node_modules/istanbul-lib-instrument/src/constants.js create mode 100644 node_modules/istanbul-lib-instrument/src/index.js create mode 100644 node_modules/istanbul-lib-instrument/src/instrumenter.js create mode 100644 node_modules/istanbul-lib-instrument/src/read-coverage.js create mode 100644 node_modules/istanbul-lib-instrument/src/source-coverage.js create mode 100644 node_modules/istanbul-lib-instrument/src/visitor.js delete mode 100644 node_modules/jest-changed-files/build/git.d.ts delete mode 100644 node_modules/jest-changed-files/build/hg.d.ts create mode 100644 node_modules/jest-changed-files/build/sl.js delete mode 100644 node_modules/jest-changed-files/build/types.d.ts delete mode 100644 node_modules/jest-changed-files/node_modules/execa/index.d.ts delete mode 100644 node_modules/jest-changed-files/node_modules/execa/index.js delete mode 100644 node_modules/jest-changed-files/node_modules/execa/lib/command.js delete mode 100644 node_modules/jest-changed-files/node_modules/execa/lib/error.js delete mode 100644 node_modules/jest-changed-files/node_modules/execa/lib/stdio.js delete mode 100644 node_modules/jest-changed-files/node_modules/execa/lib/stream.js delete mode 100644 node_modules/jest-changed-files/node_modules/execa/license delete mode 100644 node_modules/jest-changed-files/node_modules/execa/package.json delete mode 100644 node_modules/jest-changed-files/node_modules/execa/readme.md delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/buffer-stream.js delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/index.d.ts delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/index.js delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/license delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/package.json delete mode 100644 node_modules/jest-changed-files/node_modules/get-stream/readme.md delete mode 100644 node_modules/jest-changed-files/node_modules/is-stream/index.d.ts delete mode 100644 node_modules/jest-changed-files/node_modules/is-stream/index.js delete mode 100644 node_modules/jest-changed-files/node_modules/is-stream/license delete mode 100644 node_modules/jest-changed-files/node_modules/is-stream/package.json delete mode 100644 node_modules/jest-changed-files/node_modules/is-stream/readme.md delete mode 100644 node_modules/jest-changed-files/node_modules/npm-run-path/index.js delete mode 100644 node_modules/jest-changed-files/node_modules/npm-run-path/license delete mode 100644 node_modules/jest-changed-files/node_modules/npm-run-path/package.json delete mode 100644 node_modules/jest-changed-files/node_modules/npm-run-path/readme.md create mode 100644 node_modules/jest-circus/LICENSE create mode 100644 node_modules/jest-circus/README.md create mode 100644 node_modules/jest-circus/build/eventHandler.js create mode 100644 node_modules/jest-circus/build/formatNodeAssertErrors.js create mode 100644 node_modules/jest-circus/build/globalErrorHandlers.js create mode 100644 node_modules/jest-circus/build/index.d.ts create mode 100644 node_modules/jest-circus/build/index.js create mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js create mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js create mode 100644 node_modules/jest-circus/build/run.js create mode 100644 node_modules/jest-circus/build/shuffleArray.js create mode 100644 node_modules/jest-circus/build/state.js create mode 100644 node_modules/jest-circus/build/testCaseReportHandler.js create mode 100644 node_modules/jest-circus/build/types.js create mode 100644 node_modules/jest-circus/build/utils.js create mode 100644 node_modules/jest-circus/package.json create mode 100644 node_modules/jest-circus/runner.js create mode 100644 node_modules/jest-cli/LICENSE create mode 100644 node_modules/jest-cli/README.md create mode 100755 node_modules/jest-cli/bin/jest.js create mode 100644 node_modules/jest-cli/build/args.js create mode 100644 node_modules/jest-cli/build/index.d.ts create mode 100644 node_modules/jest-cli/build/index.js create mode 100644 node_modules/jest-cli/build/init/errors.js rename node_modules/{jest/node_modules => }/jest-cli/build/init/generateConfigFile.js (76%) create mode 100644 node_modules/jest-cli/build/init/index.js rename node_modules/{jest/node_modules => }/jest-cli/build/init/modifyPackageJson.js (81%) rename node_modules/{jest/node_modules => }/jest-cli/build/init/questions.js (90%) create mode 100644 node_modules/jest-cli/build/init/types.js create mode 100644 node_modules/jest-cli/build/run.js create mode 100644 node_modules/jest-cli/package.json delete mode 100644 node_modules/jest-config/build/Defaults.d.ts delete mode 100644 node_modules/jest-config/build/Deprecated.d.ts delete mode 100644 node_modules/jest-config/build/Descriptions.d.ts delete mode 100644 node_modules/jest-config/build/ReporterValidationErrors.d.ts delete mode 100644 node_modules/jest-config/build/ValidConfig.d.ts delete mode 100644 node_modules/jest-config/build/color.d.ts delete mode 100644 node_modules/jest-config/build/constants.d.ts delete mode 100644 node_modules/jest-config/build/getCacheDirectory.d.ts delete mode 100644 node_modules/jest-config/build/getMaxWorkers.d.ts delete mode 100644 node_modules/jest-config/build/normalize.d.ts create mode 100644 node_modules/jest-config/build/parseShardPair.js delete mode 100644 node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts delete mode 100644 node_modules/jest-config/build/resolveConfigPath.d.ts delete mode 100644 node_modules/jest-config/build/setFromArgv.d.ts create mode 100644 node_modules/jest-config/build/stringToBytes.js delete mode 100644 node_modules/jest-config/build/utils.d.ts delete mode 100644 node_modules/jest-config/build/validatePattern.d.ts delete mode 100644 node_modules/jest-config/build/vendor/jsonlint.js delete mode 100644 node_modules/jest-diff/build/cleanupSemantic.d.ts delete mode 100644 node_modules/jest-diff/build/constants.d.ts delete mode 100644 node_modules/jest-diff/build/diffLines.d.ts delete mode 100644 node_modules/jest-diff/build/diffStrings.d.ts delete mode 100644 node_modules/jest-diff/build/getAlignedDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/joinAlignedDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/normalizeDiffOptions.d.ts delete mode 100644 node_modules/jest-diff/build/printDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/types.d.ts delete mode 100644 node_modules/jest-each/build/bind.d.ts delete mode 100644 node_modules/jest-each/build/table/array.d.ts create mode 100644 node_modules/jest-each/build/table/interpolation.js delete mode 100644 node_modules/jest-each/build/table/template.d.ts delete mode 100644 node_modules/jest-each/build/validation.d.ts delete mode 100644 node_modules/jest-environment-jsdom/LICENSE delete mode 100644 node_modules/jest-environment-jsdom/build/index.d.ts delete mode 100644 node_modules/jest-environment-jsdom/build/index.js delete mode 100644 node_modules/jest-environment-jsdom/package.json delete mode 100644 node_modules/jest-haste-map/build/HasteFS.d.ts delete mode 100644 node_modules/jest-haste-map/build/ModuleMap.d.ts delete mode 100644 node_modules/jest-haste-map/build/blacklist.d.ts delete mode 100644 node_modules/jest-haste-map/build/constants.d.ts delete mode 100644 node_modules/jest-haste-map/build/crawlers/node.d.ts delete mode 100644 node_modules/jest-haste-map/build/crawlers/watchman.d.ts delete mode 100644 node_modules/jest-haste-map/build/getMockName.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/fast_path.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/isRegExpSupported.js create mode 100644 node_modules/jest-haste-map/build/lib/isWatchmanInstalled.js delete mode 100644 node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts delete mode 100644 node_modules/jest-haste-map/build/types.d.ts rename node_modules/jest-haste-map/build/{lib => watchers}/FSEventsWatcher.js (80%) create mode 100644 node_modules/jest-haste-map/build/watchers/NodeWatcher.js create mode 100644 node_modules/jest-haste-map/build/watchers/RecrawlWarning.js rename node_modules/jest-haste-map/build/{lib => watchers}/WatchmanWatcher.js (79%) rename node_modules/{sane/src => jest-haste-map/build/watchers}/common.js (87%) delete mode 100644 node_modules/jest-haste-map/build/worker.d.ts delete mode 100644 node_modules/jest-jasmine2/LICENSE delete mode 100644 node_modules/jest-jasmine2/build/ExpectationFailed.d.ts delete mode 100644 node_modules/jest-jasmine2/build/ExpectationFailed.js delete mode 100644 node_modules/jest-jasmine2/build/PCancelable.d.ts delete mode 100644 node_modules/jest-jasmine2/build/PCancelable.js delete mode 100644 node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts delete mode 100644 node_modules/jest-jasmine2/build/assertionErrorMessage.js delete mode 100644 node_modules/jest-jasmine2/build/each.d.ts delete mode 100644 node_modules/jest-jasmine2/build/each.js delete mode 100644 node_modules/jest-jasmine2/build/errorOnPrivate.d.ts delete mode 100644 node_modules/jest-jasmine2/build/errorOnPrivate.js delete mode 100644 node_modules/jest-jasmine2/build/expectationResultFactory.d.ts delete mode 100644 node_modules/jest-jasmine2/build/expectationResultFactory.js delete mode 100644 node_modules/jest-jasmine2/build/index.d.ts delete mode 100644 node_modules/jest-jasmine2/build/index.js delete mode 100644 node_modules/jest-jasmine2/build/isError.d.ts delete mode 100644 node_modules/jest-jasmine2/build/isError.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/CallTracker.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Env.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Env.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Spec.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Spec.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Suite.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Suite.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Timer.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Timer.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/createSpy.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/jasmineLight.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/spyRegistry.js delete mode 100644 node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmineAsyncInstall.js delete mode 100644 node_modules/jest-jasmine2/build/jestExpect.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jestExpect.js delete mode 100644 node_modules/jest-jasmine2/build/pTimeout.d.ts delete mode 100644 node_modules/jest-jasmine2/build/pTimeout.js delete mode 100644 node_modules/jest-jasmine2/build/queueRunner.d.ts delete mode 100644 node_modules/jest-jasmine2/build/queueRunner.js delete mode 100644 node_modules/jest-jasmine2/build/reporter.d.ts delete mode 100644 node_modules/jest-jasmine2/build/reporter.js delete mode 100644 node_modules/jest-jasmine2/build/setup_jest_globals.d.ts delete mode 100644 node_modules/jest-jasmine2/build/setup_jest_globals.js delete mode 100644 node_modules/jest-jasmine2/build/treeProcessor.d.ts delete mode 100644 node_modules/jest-jasmine2/build/treeProcessor.js delete mode 100644 node_modules/jest-jasmine2/build/types.d.ts delete mode 100644 node_modules/jest-jasmine2/build/types.js delete mode 100644 node_modules/jest-jasmine2/package.json create mode 100644 node_modules/jest-matcher-utils/README.md delete mode 100644 node_modules/jest-matcher-utils/build/Replaceable.d.ts delete mode 100644 node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.d.ts delete mode 100644 node_modules/jest-message-util/build/types.d.ts create mode 100644 node_modules/jest-message-util/node_modules/@babel/code-frame/LICENSE create mode 100644 node_modules/jest-message-util/node_modules/@babel/code-frame/README.md create mode 100644 node_modules/jest-message-util/node_modules/@babel/code-frame/lib/index.js create mode 100644 node_modules/jest-message-util/node_modules/@babel/code-frame/lib/index.js.map create mode 100644 node_modules/jest-message-util/node_modules/@babel/code-frame/package.json delete mode 100644 node_modules/jest-resolve/build/ModuleNotFoundError.d.ts delete mode 100644 node_modules/jest-resolve/build/defaultResolver.d.ts create mode 100644 node_modules/jest-resolve/build/fileWalkers.js delete mode 100644 node_modules/jest-resolve/build/isBuiltinModule.d.ts delete mode 100644 node_modules/jest-resolve/build/nodeModulesPaths.d.ts create mode 100644 node_modules/jest-resolve/build/resolver.js delete mode 100644 node_modules/jest-resolve/build/shouldLoadAsEsm.d.ts delete mode 100644 node_modules/jest-resolve/build/types.d.ts create mode 100644 node_modules/jest-resolve/build/utils.js delete mode 100644 node_modules/jest-runner/build/runTest.d.ts delete mode 100644 node_modules/jest-runner/build/testWorker.d.ts delete mode 100644 node_modules/jest-runner/build/types.d.ts delete mode 100755 node_modules/jest-runtime/bin/jest-runtime.js delete mode 100644 node_modules/jest-runtime/build/cli/args.d.ts delete mode 100644 node_modules/jest-runtime/build/cli/args.js delete mode 100644 node_modules/jest-runtime/build/cli/index.d.ts delete mode 100644 node_modules/jest-runtime/build/cli/index.js delete mode 100644 node_modules/jest-runtime/build/helpers.d.ts delete mode 100644 node_modules/jest-runtime/build/types.d.ts delete mode 100644 node_modules/jest-runtime/build/version.d.ts delete mode 100644 node_modules/jest-runtime/build/version.js delete mode 100644 node_modules/jest-serializer/LICENSE delete mode 100644 node_modules/jest-serializer/README.md delete mode 100644 node_modules/jest-serializer/build/index.d.ts delete mode 100644 node_modules/jest-serializer/build/index.js delete mode 100644 node_modules/jest-serializer/package.json delete mode 100644 node_modules/jest-serializer/v8.d.ts delete mode 100644 node_modules/jest-snapshot/build/InlineSnapshots.d.ts delete mode 100644 node_modules/jest-snapshot/build/SnapshotResolver.d.ts delete mode 100644 node_modules/jest-snapshot/build/State.d.ts delete mode 100644 node_modules/jest-snapshot/build/colors.d.ts delete mode 100644 node_modules/jest-snapshot/build/dedentLines.d.ts delete mode 100644 node_modules/jest-snapshot/build/mockSerializer.d.ts delete mode 100644 node_modules/jest-snapshot/build/plugins.d.ts delete mode 100644 node_modules/jest-snapshot/build/printSnapshot.d.ts delete mode 100644 node_modules/jest-snapshot/build/types.d.ts delete mode 100644 node_modules/jest-snapshot/build/utils.d.ts delete mode 100644 node_modules/jest-util/build/ErrorWithStack.d.ts delete mode 100644 node_modules/jest-util/build/clearLine.d.ts delete mode 100644 node_modules/jest-util/build/convertDescriptorToString.d.ts delete mode 100644 node_modules/jest-util/build/createDirectory.d.ts delete mode 100644 node_modules/jest-util/build/createProcessObject.d.ts delete mode 100644 node_modules/jest-util/build/deepCyclicCopy.d.ts delete mode 100644 node_modules/jest-util/build/formatTime.d.ts delete mode 100644 node_modules/jest-util/build/globsToMatcher.d.ts delete mode 100644 node_modules/jest-util/build/installCommonGlobals.d.ts delete mode 100644 node_modules/jest-util/build/interopRequireDefault.d.ts delete mode 100644 node_modules/jest-util/build/isInteractive.d.ts delete mode 100644 node_modules/jest-util/build/isPromise.d.ts delete mode 100644 node_modules/jest-util/build/pluralize.d.ts delete mode 100644 node_modules/jest-util/build/preRunMessage.d.ts delete mode 100644 node_modules/jest-util/build/replacePathSepForGlob.d.ts create mode 100644 node_modules/jest-util/build/requireOrImportModule.js delete mode 100644 node_modules/jest-util/build/setGlobal.d.ts delete mode 100644 node_modules/jest-util/build/specialChars.d.ts delete mode 100644 node_modules/jest-util/build/testPathPatternToRegExp.d.ts delete mode 100644 node_modules/jest-util/build/tryRealpath.d.ts delete mode 100644 node_modules/jest-validate/build/condition.d.ts delete mode 100644 node_modules/jest-validate/build/defaultConfig.d.ts delete mode 100644 node_modules/jest-validate/build/deprecated.d.ts delete mode 100644 node_modules/jest-validate/build/errors.d.ts delete mode 100644 node_modules/jest-validate/build/exampleConfig.d.ts delete mode 100644 node_modules/jest-validate/build/types.d.ts delete mode 100644 node_modules/jest-validate/build/utils.d.ts delete mode 100644 node_modules/jest-validate/build/validate.d.ts delete mode 100644 node_modules/jest-validate/build/validateCLIOptions.d.ts delete mode 100644 node_modules/jest-validate/build/warnings.d.ts delete mode 100644 node_modules/jest-watcher/build/BaseWatchPlugin.d.ts delete mode 100644 node_modules/jest-watcher/build/JestHooks.d.ts delete mode 100644 node_modules/jest-watcher/build/PatternPrompt.d.ts create mode 100644 node_modules/jest-watcher/build/TestWatcher.js delete mode 100644 node_modules/jest-watcher/build/constants.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/Prompt.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/colorize.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/scroll.d.ts delete mode 100644 node_modules/jest-watcher/build/types.d.ts delete mode 100644 node_modules/jest-worker/build/Farm.d.ts create mode 100644 node_modules/jest-worker/build/FifoQueue.js create mode 100644 node_modules/jest-worker/build/PriorityQueue.js delete mode 100644 node_modules/jest-worker/build/WorkerPool.d.ts delete mode 100644 node_modules/jest-worker/build/base/BaseWorkerPool.d.ts delete mode 100644 node_modules/jest-worker/build/types.d.ts delete mode 100644 node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts delete mode 100644 node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts create mode 100644 node_modules/jest-worker/build/workers/WorkerAbstract.js delete mode 100644 node_modules/jest-worker/build/workers/messageParent.d.ts delete mode 100644 node_modules/jest-worker/build/workers/processChild.d.ts delete mode 100644 node_modules/jest-worker/build/workers/threadChild.d.ts create mode 100644 node_modules/jest/build/index.d.ts create mode 100644 node_modules/jest/build/index.js delete mode 100644 node_modules/jest/build/jest.d.ts delete mode 100644 node_modules/jest/build/jest.js delete mode 120000 node_modules/jest/node_modules/.bin/jest delete mode 100644 node_modules/jest/node_modules/jest-cli/LICENSE delete mode 100644 node_modules/jest/node_modules/jest-cli/README.md delete mode 100755 node_modules/jest/node_modules/jest-cli/bin/jest.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/args.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/errors.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/generateConfigFile.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/modifyPackageJson.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/types.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/package.json delete mode 100644 node_modules/jsbn/.npmignore delete mode 100644 node_modules/jsbn/LICENSE delete mode 100644 node_modules/jsbn/README.md delete mode 100644 node_modules/jsbn/example.html delete mode 100644 node_modules/jsbn/example.js delete mode 100644 node_modules/jsbn/index.js delete mode 100644 node_modules/jsbn/package.json delete mode 100644 node_modules/jsdom/Changelog.md delete mode 100644 node_modules/jsdom/LICENSE.txt delete mode 100644 node_modules/jsdom/README.md delete mode 100644 node_modules/jsdom/lib/api.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/Window.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/js-globals.json delete mode 100644 node_modules/jsdom/lib/jsdom/browser/not-implemented.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/html.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/index.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/parser/xml.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/async-resource-queue.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/request-manager.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js delete mode 100644 node_modules/jsdom/lib/jsdom/level2/style.js delete mode 100644 node_modules/jsdom/lib/jsdom/level3/xpath.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortController-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/documents.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/XMLSerializer-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/parse5-adapter-serialization.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/serialization.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CloseEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/Event-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/WheelEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/Headers-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/header-list.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/fetch/header-types.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/Blob-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/File-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileReader-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortController.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortSignal.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbstractRange.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Attr.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BarProp.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BinaryType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Blob.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CDATASection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CanPlayTypeResult.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Comment.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomElementConstructor.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomElementRegistry.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMStringMap.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMTokenList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Document.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentReadyState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Element.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementDefinitionOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EndingType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Event.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventListener.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/External.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/File.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FilePropertyBag.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileReader.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FormData.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Function.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Headers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/History.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/InputEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Location.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MimeTypeArray.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationObserverInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MutationRecord.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NamedNodeMap.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Navigator.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Node.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeFilter.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeIterator.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/OnBeforeUnloadEventHandlerNonNull.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/OnErrorEventHandlerNonNull.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Performance.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Plugin.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PluginArray.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Range.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGBoundingBoxOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGNumber.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGSVGElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGStringList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGTitleElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Screen.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollBehavior.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollLogicalPosition.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollRestoration.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Selection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SelectionMode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRoot.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StaticRange.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StaticRangeInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Storage.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StyleSheetList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SupportedType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Text.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TextTrackKind.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ValidityState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/VisibilityState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/VoidFunction.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WebSocket.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestResponseType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLSerializer.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/binary-data.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/create-element.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/dates-and-times.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/details.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/events.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/focusing.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/html-constructor.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/json.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/node.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/number-and-date-inputs.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/ordered-set.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/selectors.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/strings.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/style-rules.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/svg/render.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/text.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/traversal.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/wrap-cookie-jar-for-request.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/hr-time/Performance-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/interfaces.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/named-properties-window.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeType-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Plugin-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node-document-position.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node-type.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NodeList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Slotable-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/post-message.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/range/AbstractRange-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/range/Range-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/range/StaticRange-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/range/boundary-point.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/selection/Selection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/helpers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl-browser.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/BarProp-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/External-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/History-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/History.webidl delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/Location-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/Screen-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/SessionHistory.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/navigation.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/named-properties-tracker.js delete mode 100644 node_modules/jsdom/lib/jsdom/utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/virtual-console.js delete mode 100644 node_modules/jsdom/lib/jsdom/vm-shim.js delete mode 120000 node_modules/jsdom/node_modules/.bin/acorn delete mode 100644 node_modules/jsdom/node_modules/acorn/CHANGELOG.md delete mode 100644 node_modules/jsdom/node_modules/acorn/LICENSE delete mode 100644 node_modules/jsdom/node_modules/acorn/README.md delete mode 100755 node_modules/jsdom/node_modules/acorn/bin/acorn delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.d.ts delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.js delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.js.map delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.mjs delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.mjs.d.ts delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/acorn.mjs.map delete mode 100644 node_modules/jsdom/node_modules/acorn/dist/bin.js delete mode 100644 node_modules/jsdom/node_modules/acorn/package.json delete mode 100644 node_modules/jsdom/package.json delete mode 100644 node_modules/json-schema/README.md delete mode 100644 node_modules/json-schema/draft-00/hyper-schema delete mode 100644 node_modules/json-schema/draft-00/json-ref delete mode 100644 node_modules/json-schema/draft-00/links delete mode 100644 node_modules/json-schema/draft-00/schema delete mode 100644 node_modules/json-schema/draft-01/hyper-schema delete mode 100644 node_modules/json-schema/draft-01/json-ref delete mode 100644 node_modules/json-schema/draft-01/links delete mode 100644 node_modules/json-schema/draft-01/schema delete mode 100644 node_modules/json-schema/draft-02/hyper-schema delete mode 100644 node_modules/json-schema/draft-02/json-ref delete mode 100644 node_modules/json-schema/draft-02/links delete mode 100644 node_modules/json-schema/draft-02/schema delete mode 100644 node_modules/json-schema/draft-03/examples/address delete mode 100644 node_modules/json-schema/draft-03/examples/calendar delete mode 100644 node_modules/json-schema/draft-03/examples/card delete mode 100644 node_modules/json-schema/draft-03/examples/geo delete mode 100644 node_modules/json-schema/draft-03/examples/interfaces delete mode 100644 node_modules/json-schema/draft-03/hyper-schema delete mode 100644 node_modules/json-schema/draft-03/json-ref delete mode 100644 node_modules/json-schema/draft-03/links delete mode 100644 node_modules/json-schema/draft-03/schema delete mode 100644 node_modules/json-schema/draft-04/hyper-schema delete mode 100644 node_modules/json-schema/draft-04/links delete mode 100644 node_modules/json-schema/draft-04/schema delete mode 100644 node_modules/json-schema/draft-zyp-json-schema-03.xml delete mode 100644 node_modules/json-schema/draft-zyp-json-schema-04.xml delete mode 100644 node_modules/json-schema/lib/links.js delete mode 100644 node_modules/json-schema/lib/validate.js delete mode 100644 node_modules/json-schema/package.json delete mode 100644 node_modules/json-schema/test/tests.js delete mode 100644 node_modules/json-stringify-safe/.npmignore delete mode 100644 node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 node_modules/json-stringify-safe/LICENSE delete mode 100644 node_modules/json-stringify-safe/Makefile delete mode 100644 node_modules/json-stringify-safe/README.md delete mode 100644 node_modules/json-stringify-safe/package.json delete mode 100644 node_modules/json-stringify-safe/stringify.js delete mode 100644 node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 node_modules/json5/CHANGELOG.md delete mode 100644 node_modules/jsprim/CHANGES.md delete mode 100644 node_modules/jsprim/CONTRIBUTING.md delete mode 100644 node_modules/jsprim/LICENSE delete mode 100644 node_modules/jsprim/README.md delete mode 100644 node_modules/jsprim/lib/jsprim.js delete mode 100644 node_modules/jsprim/package.json delete mode 100644 node_modules/kind-of/CHANGELOG.md 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 create mode 100644 node_modules/lines-and-columns/build/index.d.ts create mode 100644 node_modules/lines-and-columns/build/index.js delete mode 100644 node_modules/lines-and-columns/dist/index.d.ts delete mode 100644 node_modules/lines-and-columns/dist/index.js delete mode 100644 node_modules/lines-and-columns/dist/index.mjs delete mode 100644 node_modules/map-cache/LICENSE delete mode 100644 node_modules/map-cache/README.md delete mode 100644 node_modules/map-cache/index.js delete mode 100644 node_modules/map-cache/package.json delete mode 100644 node_modules/map-visit/LICENSE delete mode 100644 node_modules/map-visit/README.md delete mode 100644 node_modules/map-visit/index.js delete mode 100644 node_modules/map-visit/package.json delete mode 100644 node_modules/micromatch/CHANGELOG.md delete mode 100644 node_modules/mime-db/HISTORY.md delete mode 100644 node_modules/mime-db/LICENSE delete mode 100644 node_modules/mime-db/README.md delete mode 100644 node_modules/mime-db/db.json delete mode 100644 node_modules/mime-db/index.js delete mode 100644 node_modules/mime-db/package.json delete mode 100644 node_modules/mime-types/HISTORY.md delete mode 100644 node_modules/mime-types/LICENSE delete mode 100644 node_modules/mime-types/README.md delete mode 100644 node_modules/mime-types/index.js delete mode 100644 node_modules/mime-types/package.json delete mode 100644 node_modules/minimist/.travis.yml delete mode 100644 node_modules/minimist/LICENSE delete mode 100644 node_modules/minimist/example/parse.js delete mode 100644 node_modules/minimist/index.js delete mode 100644 node_modules/minimist/package.json delete mode 100644 node_modules/minimist/readme.markdown delete mode 100644 node_modules/minimist/test/all_bool.js delete mode 100644 node_modules/minimist/test/bool.js delete mode 100644 node_modules/minimist/test/dash.js delete mode 100644 node_modules/minimist/test/default_bool.js delete mode 100644 node_modules/minimist/test/dotted.js delete mode 100644 node_modules/minimist/test/kv_short.js delete mode 100644 node_modules/minimist/test/long.js delete mode 100644 node_modules/minimist/test/num.js delete mode 100644 node_modules/minimist/test/parse.js delete mode 100644 node_modules/minimist/test/parse_modified.js delete mode 100644 node_modules/minimist/test/proto.js delete mode 100644 node_modules/minimist/test/short.js delete mode 100644 node_modules/minimist/test/stop_early.js delete mode 100644 node_modules/minimist/test/unknown.js delete mode 100644 node_modules/minimist/test/whitespace.js delete mode 100644 node_modules/mixin-deep/LICENSE delete mode 100644 node_modules/mixin-deep/README.md delete mode 100644 node_modules/mixin-deep/index.js delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/LICENSE delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/README.md delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.d.ts delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.js delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/package.json delete mode 100644 node_modules/mixin-deep/node_modules/is-plain-object/LICENSE delete mode 100644 node_modules/mixin-deep/node_modules/is-plain-object/README.md delete mode 100644 node_modules/mixin-deep/node_modules/is-plain-object/index.d.ts delete mode 100644 node_modules/mixin-deep/node_modules/is-plain-object/index.js delete mode 100644 node_modules/mixin-deep/node_modules/is-plain-object/package.json delete mode 100644 node_modules/mixin-deep/package.json delete mode 100644 node_modules/nanomatch/CHANGELOG.md delete mode 100644 node_modules/nanomatch/LICENSE delete mode 100644 node_modules/nanomatch/README.md delete mode 100644 node_modules/nanomatch/index.js delete mode 100644 node_modules/nanomatch/lib/cache.js delete mode 100644 node_modules/nanomatch/lib/compilers.js delete mode 100644 node_modules/nanomatch/lib/parsers.js delete mode 100644 node_modules/nanomatch/lib/utils.js delete mode 100644 node_modules/nanomatch/package.json delete mode 100644 node_modules/nice-try/CHANGELOG.md delete mode 100644 node_modules/nice-try/LICENSE delete mode 100644 node_modules/nice-try/README.md delete mode 100644 node_modules/nice-try/package.json delete mode 100644 node_modules/nice-try/src/index.js delete mode 100644 node_modules/node-modules-regexp/index.js delete mode 100644 node_modules/node-modules-regexp/license delete mode 100644 node_modules/node-modules-regexp/package.json delete mode 100644 node_modules/node-modules-regexp/readme.md delete mode 100644 node_modules/node-notifier/.prettierrc delete mode 100644 node_modules/node-notifier/CHANGELOG.md delete mode 100644 node_modules/node-notifier/LICENSE delete mode 100644 node_modules/node-notifier/README.md delete mode 100644 node_modules/node-notifier/index.js delete mode 100644 node_modules/node-notifier/lib/checkGrowl.js delete mode 100644 node_modules/node-notifier/lib/utils.js delete mode 100644 node_modules/node-notifier/notifiers/balloon.js delete mode 100644 node_modules/node-notifier/notifiers/growl.js delete mode 100644 node_modules/node-notifier/notifiers/notificationcenter.js delete mode 100644 node_modules/node-notifier/notifiers/notifysend.js delete mode 100644 node_modules/node-notifier/notifiers/toaster.js delete mode 100644 node_modules/node-notifier/package.json delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist delete mode 100755 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/PkgInfo delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/Terminal.icns delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/InfoPlist.strings delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib delete mode 100644 node_modules/node-notifier/vendor/notifu/LICENSE delete mode 100755 node_modules/node-notifier/vendor/notifu/notifu.exe delete mode 100755 node_modules/node-notifier/vendor/notifu/notifu64.exe delete mode 100644 node_modules/node-notifier/vendor/snoreToast/LICENSE delete mode 100644 node_modules/node-notifier/vendor/snoreToast/snoretoast-x64.exe delete mode 100644 node_modules/node-notifier/vendor/snoreToast/snoretoast-x86.exe delete mode 100644 node_modules/node-notifier/vendor/terminal-notifier-LICENSE delete mode 100644 node_modules/node-releases/.github/workflows/nightly-sync.yml delete mode 100644 node_modules/node-releases/data/raw/iojs.json delete mode 100644 node_modules/node-releases/data/raw/nodejs.json delete mode 100644 node_modules/normalize-package-data/AUTHORS delete mode 100644 node_modules/normalize-package-data/LICENSE delete mode 100644 node_modules/normalize-package-data/README.md delete mode 100644 node_modules/normalize-package-data/lib/extract_description.js delete mode 100644 node_modules/normalize-package-data/lib/fixer.js delete mode 100644 node_modules/normalize-package-data/lib/make_warning.js delete mode 100644 node_modules/normalize-package-data/lib/normalize.js delete mode 100644 node_modules/normalize-package-data/lib/safe_format.js delete mode 100644 node_modules/normalize-package-data/lib/typos.json delete mode 100644 node_modules/normalize-package-data/lib/warning_messages.json delete mode 120000 node_modules/normalize-package-data/node_modules/.bin/semver delete mode 100644 node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/normalize-package-data/node_modules/semver/LICENSE delete mode 100644 node_modules/normalize-package-data/node_modules/semver/README.md delete mode 100755 node_modules/normalize-package-data/node_modules/semver/bin/semver delete mode 100644 node_modules/normalize-package-data/node_modules/semver/package.json delete mode 100644 node_modules/normalize-package-data/node_modules/semver/range.bnf delete mode 100644 node_modules/normalize-package-data/node_modules/semver/semver.js delete mode 100644 node_modules/normalize-package-data/package.json rename node_modules/{jest-changed-files/node_modules => }/npm-run-path/index.d.ts (100%) delete mode 100644 node_modules/npm-run-path/node_modules/path-key/index.js delete mode 100644 node_modules/npm-run-path/node_modules/path-key/license delete mode 100644 node_modules/npm-run-path/node_modules/path-key/package.json delete mode 100644 node_modules/npm-run-path/node_modules/path-key/readme.md delete mode 100644 node_modules/nwsapi/LICENSE delete mode 100644 node_modules/nwsapi/README.md delete mode 100644 node_modules/nwsapi/dist/lint.log delete mode 100644 node_modules/nwsapi/package.json delete mode 100644 node_modules/nwsapi/src/modules/nwsapi-jquery.js delete mode 100644 node_modules/nwsapi/src/modules/nwsapi-traversal.js delete mode 100644 node_modules/nwsapi/src/nwsapi.js delete mode 100644 node_modules/oauth-sign/LICENSE delete mode 100644 node_modules/oauth-sign/README.md delete mode 100644 node_modules/oauth-sign/index.js delete mode 100644 node_modules/oauth-sign/package.json delete mode 100644 node_modules/object-copy/LICENSE delete mode 100644 node_modules/object-copy/index.js delete mode 100644 node_modules/object-copy/node_modules/define-property/LICENSE delete mode 100644 node_modules/object-copy/node_modules/define-property/README.md delete mode 100644 node_modules/object-copy/node_modules/define-property/index.js delete mode 100644 node_modules/object-copy/node_modules/define-property/package.json delete mode 100644 node_modules/object-copy/node_modules/kind-of/LICENSE delete mode 100644 node_modules/object-copy/node_modules/kind-of/README.md delete mode 100644 node_modules/object-copy/node_modules/kind-of/index.js delete mode 100644 node_modules/object-copy/node_modules/kind-of/package.json delete mode 100644 node_modules/object-copy/package.json delete mode 100644 node_modules/object-visit/LICENSE delete mode 100644 node_modules/object-visit/README.md delete mode 100644 node_modules/object-visit/index.js delete mode 100644 node_modules/object-visit/package.json delete mode 100644 node_modules/object.pick/LICENSE delete mode 100644 node_modules/object.pick/README.md delete mode 100644 node_modules/object.pick/index.js delete mode 100644 node_modules/object.pick/package.json delete mode 100644 node_modules/p-each-series/index.d.ts delete mode 100644 node_modules/p-each-series/index.js delete mode 100644 node_modules/p-each-series/license delete mode 100644 node_modules/p-each-series/package.json delete mode 100644 node_modules/p-each-series/readme.md delete mode 100644 node_modules/p-finally/index.js delete mode 100644 node_modules/p-finally/license delete mode 100644 node_modules/p-finally/package.json delete mode 100644 node_modules/p-finally/readme.md create mode 100644 node_modules/p-locate/node_modules/p-limit/index.d.ts create mode 100644 node_modules/p-locate/node_modules/p-limit/index.js rename node_modules/{expect/node_modules/ansi-styles => p-locate/node_modules/p-limit}/license (100%) create mode 100644 node_modules/p-locate/node_modules/p-limit/package.json create mode 100644 node_modules/p-locate/node_modules/p-limit/readme.md delete mode 100644 node_modules/parse5/LICENSE delete mode 100644 node_modules/parse5/README.md delete mode 100644 node_modules/parse5/lib/common/doctype.js delete mode 100644 node_modules/parse5/lib/common/error-codes.js delete mode 100644 node_modules/parse5/lib/common/foreign-content.js delete mode 100644 node_modules/parse5/lib/common/html.js delete mode 100644 node_modules/parse5/lib/common/unicode.js delete mode 100644 node_modules/parse5/lib/extensions/error-reporting/mixin-base.js delete mode 100644 node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js delete mode 100644 node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js delete mode 100644 node_modules/parse5/lib/extensions/error-reporting/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 delete mode 100644 node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js delete mode 100644 node_modules/parse5/lib/index.js delete mode 100644 node_modules/parse5/lib/parser/formatting-element-list.js delete mode 100644 node_modules/parse5/lib/parser/index.js delete mode 100644 node_modules/parse5/lib/parser/open-element-stack.js delete mode 100644 node_modules/parse5/lib/serializer/index.js delete mode 100644 node_modules/parse5/lib/tokenizer/index.js delete mode 100644 node_modules/parse5/lib/tokenizer/named-entity-data.js delete mode 100644 node_modules/parse5/lib/tokenizer/preprocessor.js delete mode 100644 node_modules/parse5/lib/tree-adapters/default.js delete mode 100644 node_modules/parse5/lib/utils/merge-options.js delete mode 100644 node_modules/parse5/lib/utils/mixin.js delete mode 100644 node_modules/parse5/package.json delete mode 100644 node_modules/pascalcase/LICENSE delete mode 100644 node_modules/pascalcase/README.md delete mode 100644 node_modules/pascalcase/index.js delete mode 100644 node_modules/pascalcase/package.json delete mode 100644 node_modules/path-parse/.travis.yml delete mode 100644 node_modules/path-parse/test.js delete mode 100644 node_modules/performance-now/.npmignore delete mode 100644 node_modules/performance-now/.tm_properties delete mode 100644 node_modules/performance-now/.travis.yml delete mode 100644 node_modules/performance-now/README.md delete mode 100644 node_modules/performance-now/lib/performance-now.js delete mode 100644 node_modules/performance-now/lib/performance-now.js.map delete mode 100644 node_modules/performance-now/license.txt delete mode 100644 node_modules/performance-now/package.json delete mode 100644 node_modules/performance-now/src/index.d.ts delete mode 100644 node_modules/performance-now/src/performance-now.coffee delete mode 100644 node_modules/performance-now/test/mocha.opts delete mode 100644 node_modules/performance-now/test/performance-now.coffee delete mode 100644 node_modules/performance-now/test/scripts.coffee delete mode 100755 node_modules/performance-now/test/scripts/delayed-call.coffee delete mode 100755 node_modules/performance-now/test/scripts/delayed-require.coffee delete mode 100755 node_modules/performance-now/test/scripts/difference.coffee delete mode 100755 node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 node_modules/picocolors/LICENSE create mode 100644 node_modules/picocolors/README.md create mode 100644 node_modules/picocolors/package.json create mode 100644 node_modules/picocolors/picocolors.browser.js create mode 100644 node_modules/picocolors/picocolors.d.ts create mode 100644 node_modules/picocolors/picocolors.js create mode 100644 node_modules/picocolors/types.ts mode change 100755 => 100644 node_modules/picomatch/CHANGELOG.md mode change 100755 => 100644 node_modules/picomatch/LICENSE mode change 100755 => 100644 node_modules/picomatch/README.md mode change 100755 => 100644 node_modules/picomatch/index.js mode change 100755 => 100644 node_modules/picomatch/lib/constants.js mode change 100755 => 100644 node_modules/picomatch/lib/parse.js mode change 100755 => 100644 node_modules/picomatch/lib/picomatch.js mode change 100755 => 100644 node_modules/picomatch/lib/scan.js mode change 100755 => 100644 node_modules/picomatch/lib/utils.js mode change 100755 => 100644 node_modules/picomatch/package.json delete mode 100644 node_modules/posix-character-classes/LICENSE delete mode 100644 node_modules/posix-character-classes/README.md delete mode 100644 node_modules/posix-character-classes/index.js delete mode 100644 node_modules/posix-character-classes/package.json delete mode 100644 node_modules/pretty-format/build/collections.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/AsymmetricMatcher.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ConvertAnsi.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ConvertAnsi.js delete mode 100644 node_modules/pretty-format/build/plugins/DOMCollection.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/DOMElement.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/Immutable.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ReactElement.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ReactTestComponent.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/lib/escapeHTML.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/lib/markup.d.ts delete mode 100644 node_modules/pretty-format/build/types.d.ts delete mode 100644 node_modules/pretty-format/node_modules/color-convert/CHANGELOG.md delete mode 100644 node_modules/pretty-format/node_modules/color-convert/LICENSE delete mode 100644 node_modules/pretty-format/node_modules/color-convert/README.md delete mode 100644 node_modules/pretty-format/node_modules/color-convert/conversions.js delete mode 100644 node_modules/pretty-format/node_modules/color-convert/index.js delete mode 100644 node_modules/pretty-format/node_modules/color-convert/package.json delete mode 100644 node_modules/pretty-format/node_modules/color-convert/route.js delete mode 100644 node_modules/pretty-format/node_modules/color-name/LICENSE delete mode 100644 node_modules/pretty-format/node_modules/color-name/README.md delete mode 100644 node_modules/pretty-format/node_modules/color-name/index.js delete mode 100644 node_modules/pretty-format/node_modules/color-name/package.json delete mode 100644 node_modules/psl/LICENSE delete mode 100644 node_modules/psl/README.md delete mode 100644 node_modules/psl/browserstack-logo.svg delete mode 100644 node_modules/psl/data/rules.json delete mode 100644 node_modules/psl/dist/psl.js delete mode 100644 node_modules/psl/dist/psl.min.js delete mode 100644 node_modules/psl/index.js delete mode 100644 node_modules/psl/package.json delete mode 100644 node_modules/pump/.travis.yml delete mode 100644 node_modules/pump/LICENSE delete mode 100644 node_modules/pump/README.md delete mode 100644 node_modules/pump/index.js delete mode 100644 node_modules/pump/package.json delete mode 100644 node_modules/pump/test-browser.js delete mode 100644 node_modules/pump/test-node.js create mode 100644 node_modules/pure-rand/CHANGELOG.md create mode 100644 node_modules/pure-rand/LICENSE create mode 100644 node_modules/pure-rand/README.md create mode 100644 node_modules/pure-rand/lib/distribution/Distribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UniformArrayIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UniformBigIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UniformIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UnsafeUniformArrayIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UnsafeUniformBigIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/UnsafeUniformIntDistribution.js create mode 100644 node_modules/pure-rand/lib/distribution/internals/ArrayInt.js create mode 100644 node_modules/pure-rand/lib/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js create mode 100644 node_modules/pure-rand/lib/distribution/internals/UnsafeUniformIntDistributionInternal.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/Distribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js create mode 100644 node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js create mode 100644 node_modules/pure-rand/lib/esm/generator/LinearCongruential.js create mode 100644 node_modules/pure-rand/lib/esm/generator/MersenneTwister.js create mode 100644 node_modules/pure-rand/lib/esm/generator/RandomGenerator.js create mode 100644 node_modules/pure-rand/lib/esm/generator/XorShift.js create mode 100644 node_modules/pure-rand/lib/esm/generator/XoroShiro.js create mode 100644 node_modules/pure-rand/lib/esm/package.json create mode 100644 node_modules/pure-rand/lib/esm/pure-rand-default.js create mode 100644 node_modules/pure-rand/lib/esm/pure-rand.js create mode 100644 node_modules/pure-rand/lib/generator/LinearCongruential.js create mode 100644 node_modules/pure-rand/lib/generator/MersenneTwister.js create mode 100644 node_modules/pure-rand/lib/generator/RandomGenerator.js create mode 100644 node_modules/pure-rand/lib/generator/XorShift.js create mode 100644 node_modules/pure-rand/lib/generator/XoroShiro.js create mode 100644 node_modules/pure-rand/lib/pure-rand-default.js create mode 100644 node_modules/pure-rand/lib/pure-rand.js create mode 100644 node_modules/pure-rand/lib/types/distribution/Distribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UniformArrayIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UniformBigIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UniformIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UnsafeUniformArrayIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UnsafeUniformBigIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/UnsafeUniformIntDistribution.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/internals/ArrayInt.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformArrayIntDistributionInternal.d.ts create mode 100644 node_modules/pure-rand/lib/types/distribution/internals/UnsafeUniformIntDistributionInternal.d.ts create mode 100644 node_modules/pure-rand/lib/types/generator/LinearCongruential.d.ts create mode 100644 node_modules/pure-rand/lib/types/generator/MersenneTwister.d.ts create mode 100644 node_modules/pure-rand/lib/types/generator/RandomGenerator.d.ts create mode 100644 node_modules/pure-rand/lib/types/generator/XorShift.d.ts create mode 100644 node_modules/pure-rand/lib/types/generator/XoroShiro.d.ts create mode 100644 node_modules/pure-rand/lib/types/pure-rand-default.d.ts create mode 100644 node_modules/pure-rand/lib/types/pure-rand.d.ts create mode 100644 node_modules/pure-rand/package.json delete mode 100644 node_modules/qs/.editorconfig delete mode 100644 node_modules/qs/.eslintignore delete mode 100644 node_modules/qs/.eslintrc delete mode 100644 node_modules/qs/CHANGELOG.md delete mode 100644 node_modules/qs/LICENSE delete mode 100644 node_modules/qs/README.md delete mode 100644 node_modules/qs/dist/qs.js delete mode 100644 node_modules/qs/lib/formats.js delete mode 100644 node_modules/qs/lib/index.js delete mode 100644 node_modules/qs/lib/parse.js delete mode 100644 node_modules/qs/lib/stringify.js delete mode 100644 node_modules/qs/lib/utils.js delete mode 100644 node_modules/qs/package.json delete mode 100644 node_modules/qs/test/.eslintrc delete mode 100644 node_modules/qs/test/index.js delete mode 100644 node_modules/qs/test/parse.js delete mode 100644 node_modules/qs/test/stringify.js delete mode 100644 node_modules/qs/test/utils.js delete mode 100644 node_modules/react-is/build-info.json delete mode 100644 node_modules/read-pkg-up/index.d.ts delete mode 100644 node_modules/read-pkg-up/index.js delete mode 100644 node_modules/read-pkg-up/license delete mode 100644 node_modules/read-pkg-up/package.json delete mode 100644 node_modules/read-pkg-up/readme.md delete mode 100644 node_modules/read-pkg/index.d.ts delete mode 100644 node_modules/read-pkg/index.js delete mode 100644 node_modules/read-pkg/license delete mode 100644 node_modules/read-pkg/node_modules/type-fest/index.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/license delete mode 100644 node_modules/read-pkg/node_modules/type-fest/package.json delete mode 100644 node_modules/read-pkg/node_modules/type-fest/readme.md delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/basic.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/except.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/literal-union.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/merge-exclusive.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/mutable.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/package-json.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/promisable.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/readonly-deep.d.ts delete mode 100644 node_modules/read-pkg/node_modules/type-fest/source/require-at-least-one.d.ts delete mode 100644 node_modules/read-pkg/package.json delete mode 100644 node_modules/read-pkg/readme.md delete mode 100644 node_modules/regex-not/LICENSE delete mode 100644 node_modules/regex-not/README.md delete mode 100644 node_modules/regex-not/index.js delete mode 100644 node_modules/regex-not/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/LICENSE delete mode 100644 node_modules/request-promise-core/README.md delete mode 100644 node_modules/request-promise-core/configure/request-next.js delete mode 100644 node_modules/request-promise-core/configure/request2.js delete mode 100644 node_modules/request-promise-core/errors.js delete mode 100644 node_modules/request-promise-core/lib/errors.js delete mode 100644 node_modules/request-promise-core/lib/plumbing.js delete mode 100644 node_modules/request-promise-core/package.json delete mode 100644 node_modules/request-promise-native/LICENSE delete mode 100644 node_modules/request-promise-native/README.md delete mode 100644 node_modules/request-promise-native/errors.js delete mode 100644 node_modules/request-promise-native/lib/rp.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/LICENSE delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/README.md delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/cookie.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/memstore.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/store.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/lib/version.js delete mode 100644 node_modules/request-promise-native/node_modules/tough-cookie/package.json delete mode 100644 node_modules/request-promise-native/package.json delete mode 100644 node_modules/request/CHANGELOG.md delete mode 100644 node_modules/request/LICENSE delete mode 100644 node_modules/request/README.md delete mode 100755 node_modules/request/index.js delete mode 100644 node_modules/request/lib/auth.js delete mode 100644 node_modules/request/lib/cookies.js delete mode 100644 node_modules/request/lib/getProxyFromURI.js delete mode 100644 node_modules/request/lib/har.js delete mode 100644 node_modules/request/lib/hawk.js delete mode 100644 node_modules/request/lib/helpers.js delete mode 100644 node_modules/request/lib/multipart.js delete mode 100644 node_modules/request/lib/oauth.js delete mode 100644 node_modules/request/lib/querystring.js delete mode 100644 node_modules/request/lib/redirect.js delete mode 100644 node_modules/request/lib/tunnel.js delete mode 120000 node_modules/request/node_modules/.bin/uuid delete mode 100644 node_modules/request/node_modules/tough-cookie/LICENSE delete mode 100644 node_modules/request/node_modules/tough-cookie/README.md delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/cookie.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/memstore.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/store.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/version.js delete mode 100644 node_modules/request/node_modules/tough-cookie/package.json delete mode 100644 node_modules/request/node_modules/uuid/AUTHORS delete mode 100644 node_modules/request/node_modules/uuid/CHANGELOG.md delete mode 100644 node_modules/request/node_modules/uuid/LICENSE.md delete mode 100644 node_modules/request/node_modules/uuid/README.md delete mode 100755 node_modules/request/node_modules/uuid/bin/uuid delete mode 100644 node_modules/request/node_modules/uuid/index.js delete mode 100644 node_modules/request/node_modules/uuid/lib/bytesToUuid.js delete mode 100644 node_modules/request/node_modules/uuid/lib/md5-browser.js delete mode 100644 node_modules/request/node_modules/uuid/lib/md5.js delete mode 100644 node_modules/request/node_modules/uuid/lib/rng-browser.js delete mode 100644 node_modules/request/node_modules/uuid/lib/rng.js delete mode 100644 node_modules/request/node_modules/uuid/lib/sha1-browser.js delete mode 100644 node_modules/request/node_modules/uuid/lib/sha1.js delete mode 100644 node_modules/request/node_modules/uuid/lib/v35.js delete mode 100644 node_modules/request/node_modules/uuid/package.json delete mode 100644 node_modules/request/node_modules/uuid/v1.js delete mode 100644 node_modules/request/node_modules/uuid/v3.js delete mode 100644 node_modules/request/node_modules/uuid/v4.js delete mode 100644 node_modules/request/node_modules/uuid/v5.js delete mode 100644 node_modules/request/package.json delete mode 100644 node_modules/request/request.js delete mode 100644 node_modules/require-main-filename/CHANGELOG.md delete mode 100644 node_modules/require-main-filename/LICENSE.txt delete mode 100644 node_modules/require-main-filename/README.md delete mode 100644 node_modules/require-main-filename/index.js delete mode 100644 node_modules/require-main-filename/package.json delete mode 100644 node_modules/resolve-url/.jshintrc delete mode 100644 node_modules/resolve-url/LICENSE delete mode 100644 node_modules/resolve-url/bower.json delete mode 100644 node_modules/resolve-url/changelog.md delete mode 100644 node_modules/resolve-url/component.json delete mode 100644 node_modules/resolve-url/package.json delete mode 100644 node_modules/resolve-url/readme.md delete mode 100644 node_modules/resolve-url/resolve-url.js delete mode 100644 node_modules/resolve-url/test/resolve-url.js create mode 100644 node_modules/resolve.exports/dist/index.js create mode 100644 node_modules/resolve.exports/dist/index.mjs create mode 100644 node_modules/resolve.exports/index.d.ts create mode 100644 node_modules/resolve.exports/license create mode 100644 node_modules/resolve.exports/package.json create mode 100644 node_modules/resolve.exports/readme.md delete mode 100644 node_modules/resolve/.eslintignore create mode 100644 node_modules/resolve/.github/FUNDING.yml delete mode 100644 node_modules/resolve/appveyor.yml create mode 100644 node_modules/resolve/async.js create mode 100755 node_modules/resolve/bin/resolve create mode 100644 node_modules/resolve/lib/homedir.js create mode 100644 node_modules/resolve/sync.js delete mode 100644 node_modules/resolve/test/.eslintrc create mode 100644 node_modules/resolve/test/home_paths.js create mode 100644 node_modules/resolve/test/home_paths_sync.js rename node_modules/{@babel/helper-compilation-targets/lib/types.js => resolve/test/resolver/false_main/index.js} (100%) create mode 100644 node_modules/resolve/test/resolver/false_main/package.json rename node_modules/{@babel/types/lib/converters/Scope.js => resolve/test/resolver/malformed_package_json/index.js} (100%) create mode 100644 node_modules/resolve/test/resolver/malformed_package_json/package.json delete mode 100644 node_modules/ret/LICENSE delete mode 100644 node_modules/ret/README.md delete mode 100644 node_modules/ret/lib/index.js delete mode 100644 node_modules/ret/lib/positions.js delete mode 100644 node_modules/ret/lib/sets.js delete mode 100644 node_modules/ret/lib/types.js delete mode 100644 node_modules/ret/lib/util.js delete mode 100644 node_modules/ret/package.json delete mode 100644 node_modules/rsvp/CHANGELOG.md delete mode 100644 node_modules/rsvp/LICENSE delete mode 100644 node_modules/rsvp/README.md delete mode 100644 node_modules/rsvp/dist/es6/rsvp.es.js delete mode 100644 node_modules/rsvp/dist/es6/rsvp.es.map delete mode 100644 node_modules/rsvp/dist/rsvp.es.js delete mode 100644 node_modules/rsvp/dist/rsvp.es.map delete mode 100644 node_modules/rsvp/dist/rsvp.js delete mode 100644 node_modules/rsvp/dist/rsvp.map delete mode 100644 node_modules/rsvp/lib/rsvp.js delete mode 100644 node_modules/rsvp/lib/rsvp/-internal.js delete mode 100644 node_modules/rsvp/lib/rsvp/all-settled.js delete mode 100644 node_modules/rsvp/lib/rsvp/all.js delete mode 100644 node_modules/rsvp/lib/rsvp/asap.js delete mode 100644 node_modules/rsvp/lib/rsvp/config.js delete mode 100644 node_modules/rsvp/lib/rsvp/defer.js delete mode 100644 node_modules/rsvp/lib/rsvp/enumerator.js delete mode 100644 node_modules/rsvp/lib/rsvp/events.js delete mode 100644 node_modules/rsvp/lib/rsvp/filter.js delete mode 100644 node_modules/rsvp/lib/rsvp/hash-settled.js delete mode 100644 node_modules/rsvp/lib/rsvp/hash.js delete mode 100644 node_modules/rsvp/lib/rsvp/instrument.js delete mode 100644 node_modules/rsvp/lib/rsvp/map.js delete mode 100644 node_modules/rsvp/lib/rsvp/node.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise-hash.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/all.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/race.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/reject.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/resolve.js delete mode 100644 node_modules/rsvp/lib/rsvp/race.js delete mode 100644 node_modules/rsvp/lib/rsvp/reject.js delete mode 100644 node_modules/rsvp/lib/rsvp/resolve.js delete mode 100644 node_modules/rsvp/lib/rsvp/rethrow.js delete mode 100644 node_modules/rsvp/lib/rsvp/then.js delete mode 100644 node_modules/rsvp/package.json delete mode 100644 node_modules/safe-buffer/LICENSE delete mode 100644 node_modules/safe-buffer/README.md delete mode 100644 node_modules/safe-buffer/index.d.ts delete mode 100644 node_modules/safe-buffer/index.js delete mode 100644 node_modules/safe-buffer/package.json delete mode 100644 node_modules/safe-regex/.travis.yml delete mode 100644 node_modules/safe-regex/LICENSE delete mode 100644 node_modules/safe-regex/example/safe.js delete mode 100644 node_modules/safe-regex/index.js delete mode 100644 node_modules/safe-regex/package.json delete mode 100644 node_modules/safe-regex/readme.markdown delete mode 100644 node_modules/safe-regex/test/regex.js delete mode 100644 node_modules/safer-buffer/LICENSE delete mode 100644 node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 node_modules/safer-buffer/Readme.md delete mode 100644 node_modules/safer-buffer/dangerous.js delete mode 100644 node_modules/safer-buffer/package.json delete mode 100644 node_modules/safer-buffer/safer.js delete mode 100644 node_modules/safer-buffer/tests.js delete mode 100644 node_modules/sane/README.md delete mode 100755 node_modules/sane/index.js delete mode 100644 node_modules/sane/node_modules/anymatch/LICENSE delete mode 100644 node_modules/sane/node_modules/anymatch/README.md delete mode 100644 node_modules/sane/node_modules/anymatch/index.js delete mode 100644 node_modules/sane/node_modules/anymatch/package.json delete mode 100644 node_modules/sane/node_modules/braces/LICENSE delete mode 100644 node_modules/sane/node_modules/braces/README.md delete mode 100644 node_modules/sane/node_modules/braces/index.js delete mode 100644 node_modules/sane/node_modules/braces/lib/braces.js delete mode 100644 node_modules/sane/node_modules/braces/lib/compilers.js delete mode 100644 node_modules/sane/node_modules/braces/lib/parsers.js delete mode 100644 node_modules/sane/node_modules/braces/lib/utils.js delete mode 100644 node_modules/sane/node_modules/braces/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/sane/node_modules/braces/node_modules/extend-shallow/README.md delete mode 100644 node_modules/sane/node_modules/braces/node_modules/extend-shallow/index.js delete mode 100644 node_modules/sane/node_modules/braces/node_modules/extend-shallow/package.json delete mode 100644 node_modules/sane/node_modules/braces/package.json delete mode 100644 node_modules/sane/node_modules/fill-range/LICENSE delete mode 100644 node_modules/sane/node_modules/fill-range/README.md delete mode 100644 node_modules/sane/node_modules/fill-range/index.js delete mode 100644 node_modules/sane/node_modules/fill-range/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/sane/node_modules/fill-range/node_modules/extend-shallow/README.md delete mode 100644 node_modules/sane/node_modules/fill-range/node_modules/extend-shallow/index.js delete mode 100644 node_modules/sane/node_modules/fill-range/node_modules/extend-shallow/package.json delete mode 100644 node_modules/sane/node_modules/fill-range/package.json delete mode 100644 node_modules/sane/node_modules/is-number/LICENSE delete mode 100644 node_modules/sane/node_modules/is-number/README.md delete mode 100644 node_modules/sane/node_modules/is-number/index.js delete mode 100644 node_modules/sane/node_modules/is-number/node_modules/kind-of/LICENSE delete mode 100644 node_modules/sane/node_modules/is-number/node_modules/kind-of/README.md delete mode 100644 node_modules/sane/node_modules/is-number/node_modules/kind-of/index.js delete mode 100644 node_modules/sane/node_modules/is-number/node_modules/kind-of/package.json delete mode 100644 node_modules/sane/node_modules/is-number/package.json delete mode 100644 node_modules/sane/node_modules/micromatch/CHANGELOG.md delete mode 100755 node_modules/sane/node_modules/micromatch/LICENSE delete mode 100644 node_modules/sane/node_modules/micromatch/README.md delete mode 100644 node_modules/sane/node_modules/micromatch/index.js delete mode 100644 node_modules/sane/node_modules/micromatch/lib/cache.js delete mode 100644 node_modules/sane/node_modules/micromatch/lib/compilers.js delete mode 100644 node_modules/sane/node_modules/micromatch/lib/parsers.js delete mode 100644 node_modules/sane/node_modules/micromatch/lib/utils.js delete mode 100644 node_modules/sane/node_modules/micromatch/package.json delete mode 100644 node_modules/sane/node_modules/normalize-path/LICENSE delete mode 100644 node_modules/sane/node_modules/normalize-path/README.md delete mode 100644 node_modules/sane/node_modules/normalize-path/index.js delete mode 100644 node_modules/sane/node_modules/normalize-path/package.json delete mode 100644 node_modules/sane/node_modules/to-regex-range/LICENSE delete mode 100644 node_modules/sane/node_modules/to-regex-range/README.md delete mode 100644 node_modules/sane/node_modules/to-regex-range/index.js delete mode 100644 node_modules/sane/node_modules/to-regex-range/package.json delete mode 100644 node_modules/sane/package.json delete mode 100755 node_modules/sane/src/cli.js delete mode 100644 node_modules/sane/src/node_watcher.js delete mode 100644 node_modules/sane/src/poll_watcher.js delete mode 100644 node_modules/sane/src/utils/recrawl-warning-dedupe.js delete mode 100644 node_modules/sane/src/watchexec_client.js delete mode 100644 node_modules/sane/src/watchexec_watcher.js delete mode 100644 node_modules/sane/src/watchman_client.js delete mode 100644 node_modules/sane/src/watchman_watcher.js delete mode 100644 node_modules/saxes/README.md delete mode 100644 node_modules/saxes/package.json delete mode 100644 node_modules/saxes/saxes.d.ts delete mode 100644 node_modules/saxes/saxes.js delete mode 100644 node_modules/saxes/saxes.js.map delete mode 100644 node_modules/set-blocking/CHANGELOG.md delete mode 100644 node_modules/set-blocking/LICENSE.txt delete mode 100644 node_modules/set-blocking/README.md delete mode 100644 node_modules/set-blocking/index.js delete mode 100644 node_modules/set-blocking/package.json delete mode 100644 node_modules/set-value/LICENSE delete mode 100644 node_modules/set-value/README.md delete mode 100644 node_modules/set-value/index.js delete mode 100644 node_modules/set-value/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/set-value/node_modules/extend-shallow/README.md delete mode 100644 node_modules/set-value/node_modules/extend-shallow/index.js delete mode 100644 node_modules/set-value/node_modules/extend-shallow/package.json delete mode 100644 node_modules/set-value/node_modules/is-plain-object/LICENSE delete mode 100644 node_modules/set-value/node_modules/is-plain-object/README.md delete mode 100644 node_modules/set-value/node_modules/is-plain-object/index.d.ts delete mode 100644 node_modules/set-value/node_modules/is-plain-object/index.js delete mode 100644 node_modules/set-value/node_modules/is-plain-object/package.json delete mode 100644 node_modules/set-value/package.json delete mode 100644 node_modules/shellwords/LICENSE delete mode 100644 node_modules/shellwords/README.md delete mode 100644 node_modules/shellwords/lib/shellwords.js delete mode 100644 node_modules/shellwords/package.json delete mode 100644 node_modules/signal-exit/CHANGELOG.md delete mode 100644 node_modules/snapdragon-node/LICENSE delete mode 100644 node_modules/snapdragon-node/README.md delete mode 100644 node_modules/snapdragon-node/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/package.json delete mode 100644 node_modules/snapdragon-util/LICENSE delete mode 100644 node_modules/snapdragon-util/README.md delete mode 100644 node_modules/snapdragon-util/index.js delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/LICENSE delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/README.md delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/index.js delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/package.json delete mode 100644 node_modules/snapdragon-util/package.json delete mode 100644 node_modules/snapdragon/LICENSE delete mode 100644 node_modules/snapdragon/README.md delete mode 100644 node_modules/snapdragon/index.js delete mode 100644 node_modules/snapdragon/lib/compiler.js delete mode 100644 node_modules/snapdragon/lib/parser.js delete mode 100644 node_modules/snapdragon/lib/position.js delete mode 100644 node_modules/snapdragon/lib/source-maps.js delete mode 100644 node_modules/snapdragon/lib/utils.js delete mode 100644 node_modules/snapdragon/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/snapdragon/node_modules/debug/.eslintrc delete mode 100644 node_modules/snapdragon/node_modules/debug/.npmignore delete mode 100644 node_modules/snapdragon/node_modules/debug/.travis.yml delete mode 100644 node_modules/snapdragon/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/snapdragon/node_modules/debug/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/debug/Makefile delete mode 100644 node_modules/snapdragon/node_modules/debug/README.md delete mode 100644 node_modules/snapdragon/node_modules/debug/component.json delete mode 100644 node_modules/snapdragon/node_modules/debug/karma.conf.js delete mode 100644 node_modules/snapdragon/node_modules/debug/node.js delete mode 100644 node_modules/snapdragon/node_modules/debug/package.json delete mode 100644 node_modules/snapdragon/node_modules/debug/src/browser.js delete mode 100644 node_modules/snapdragon/node_modules/debug/src/debug.js delete mode 100644 node_modules/snapdragon/node_modules/debug/src/index.js delete mode 100644 node_modules/snapdragon/node_modules/debug/src/inspector-log.js delete mode 100644 node_modules/snapdragon/node_modules/debug/src/node.js delete mode 100644 node_modules/snapdragon/node_modules/define-property/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/define-property/README.md delete mode 100644 node_modules/snapdragon/node_modules/define-property/index.js delete mode 100644 node_modules/snapdragon/node_modules/define-property/package.json delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/README.md delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/index.js delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/package.json delete mode 100644 node_modules/snapdragon/node_modules/ms/index.js delete mode 100644 node_modules/snapdragon/node_modules/ms/license.md delete mode 100644 node_modules/snapdragon/node_modules/ms/package.json delete mode 100644 node_modules/snapdragon/node_modules/ms/readme.md delete mode 100644 node_modules/snapdragon/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/snapdragon/node_modules/source-map/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/source-map/README.md delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/util.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/package.json delete mode 100644 node_modules/snapdragon/node_modules/source-map/source-map.js delete mode 100644 node_modules/snapdragon/package.json delete mode 100644 node_modules/source-map-resolve/LICENSE delete mode 100644 node_modules/source-map-resolve/changelog.md delete mode 100644 node_modules/source-map-resolve/lib/decode-uri-component.js delete mode 100644 node_modules/source-map-resolve/lib/resolve-url.js delete mode 100644 node_modules/source-map-resolve/lib/source-map-resolve-node.js delete mode 100644 node_modules/source-map-resolve/package.json delete mode 100644 node_modules/source-map-resolve/readme.md delete mode 100644 node_modules/source-map-resolve/source-map-resolve.js delete mode 100644 node_modules/source-map-url/LICENSE delete mode 100644 node_modules/source-map-url/changelog.md delete mode 100644 node_modules/source-map-url/package.json delete mode 100644 node_modules/source-map-url/readme.md delete mode 100644 node_modules/source-map-url/source-map-url.js delete mode 100644 node_modules/spdx-correct/README.md delete mode 100644 node_modules/spdx-correct/index.js delete mode 100644 node_modules/spdx-correct/package.json delete mode 100644 node_modules/spdx-exceptions/README.md delete mode 100644 node_modules/spdx-exceptions/index.json delete mode 100644 node_modules/spdx-exceptions/package.json delete mode 100644 node_modules/spdx-expression-parse/AUTHORS delete mode 100644 node_modules/spdx-expression-parse/LICENSE delete mode 100644 node_modules/spdx-expression-parse/README.md delete mode 100644 node_modules/spdx-expression-parse/index.js delete mode 100644 node_modules/spdx-expression-parse/package.json delete mode 100644 node_modules/spdx-expression-parse/parse.js delete mode 100644 node_modules/spdx-expression-parse/scan.js delete mode 100644 node_modules/spdx-license-ids/README.md delete mode 100644 node_modules/spdx-license-ids/deprecated.json delete mode 100644 node_modules/spdx-license-ids/index.json delete mode 100644 node_modules/spdx-license-ids/package.json delete mode 100644 node_modules/split-string/LICENSE delete mode 100644 node_modules/split-string/README.md delete mode 100644 node_modules/split-string/index.js delete mode 100644 node_modules/split-string/package.json delete mode 100644 node_modules/sshpk/.npmignore delete mode 100644 node_modules/sshpk/.travis.yml delete mode 100644 node_modules/sshpk/LICENSE delete mode 100644 node_modules/sshpk/README.md delete mode 100755 node_modules/sshpk/bin/sshpk-conv delete mode 100755 node_modules/sshpk/bin/sshpk-sign delete mode 100755 node_modules/sshpk/bin/sshpk-verify delete mode 100644 node_modules/sshpk/lib/algs.js delete mode 100644 node_modules/sshpk/lib/certificate.js delete mode 100644 node_modules/sshpk/lib/dhe.js delete mode 100644 node_modules/sshpk/lib/ed-compat.js delete mode 100644 node_modules/sshpk/lib/errors.js delete mode 100644 node_modules/sshpk/lib/fingerprint.js delete mode 100644 node_modules/sshpk/lib/formats/auto.js delete mode 100644 node_modules/sshpk/lib/formats/dnssec.js delete mode 100644 node_modules/sshpk/lib/formats/openssh-cert.js delete mode 100644 node_modules/sshpk/lib/formats/pem.js delete mode 100644 node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 node_modules/sshpk/lib/formats/putty.js delete mode 100644 node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 node_modules/sshpk/lib/formats/ssh.js delete mode 100644 node_modules/sshpk/lib/formats/x509-pem.js delete mode 100644 node_modules/sshpk/lib/formats/x509.js delete mode 100644 node_modules/sshpk/lib/identity.js delete mode 100644 node_modules/sshpk/lib/index.js delete mode 100644 node_modules/sshpk/lib/key.js delete mode 100644 node_modules/sshpk/lib/private-key.js delete mode 100644 node_modules/sshpk/lib/signature.js delete mode 100644 node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 node_modules/sshpk/lib/utils.js delete mode 100644 node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 node_modules/sshpk/package.json create mode 100644 node_modules/stack-utils/LICENSE.md delete mode 100644 node_modules/stack-utils/license delete mode 100644 node_modules/static-extend/LICENSE delete mode 100644 node_modules/static-extend/index.js delete mode 100644 node_modules/static-extend/node_modules/define-property/LICENSE delete mode 100644 node_modules/static-extend/node_modules/define-property/README.md delete mode 100644 node_modules/static-extend/node_modules/define-property/index.js delete mode 100644 node_modules/static-extend/node_modules/define-property/package.json delete mode 100644 node_modules/static-extend/package.json delete mode 100644 node_modules/stealthy-require/.npmignore delete mode 100644 node_modules/stealthy-require/LICENSE delete mode 100644 node_modules/stealthy-require/README.md delete mode 100644 node_modules/stealthy-require/lib/index.js delete mode 100644 node_modules/stealthy-require/package.json delete mode 100644 node_modules/strip-eof/index.js delete mode 100644 node_modules/strip-eof/license delete mode 100644 node_modules/strip-eof/package.json delete mode 100644 node_modules/strip-eof/readme.md delete mode 100644 node_modules/supports-hyperlinks/browser.js delete mode 100644 node_modules/supports-hyperlinks/index.js delete mode 100644 node_modules/supports-hyperlinks/license delete mode 100644 node_modules/supports-hyperlinks/node_modules/has-flag/index.d.ts delete mode 100644 node_modules/supports-hyperlinks/node_modules/has-flag/index.js delete mode 100644 node_modules/supports-hyperlinks/node_modules/has-flag/license delete mode 100644 node_modules/supports-hyperlinks/node_modules/has-flag/package.json delete mode 100644 node_modules/supports-hyperlinks/node_modules/has-flag/readme.md delete mode 100644 node_modules/supports-hyperlinks/node_modules/supports-color/browser.js delete mode 100644 node_modules/supports-hyperlinks/node_modules/supports-color/index.js delete mode 100644 node_modules/supports-hyperlinks/node_modules/supports-color/license delete mode 100644 node_modules/supports-hyperlinks/node_modules/supports-color/package.json delete mode 100644 node_modules/supports-hyperlinks/node_modules/supports-color/readme.md delete mode 100644 node_modules/supports-hyperlinks/package.json delete mode 100644 node_modules/supports-hyperlinks/readme.md create mode 100644 node_modules/supports-preserve-symlinks-flag/.eslintrc create mode 100644 node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml create mode 100644 node_modules/supports-preserve-symlinks-flag/.nycrc create mode 100644 node_modules/supports-preserve-symlinks-flag/CHANGELOG.md create mode 100644 node_modules/supports-preserve-symlinks-flag/LICENSE create mode 100644 node_modules/supports-preserve-symlinks-flag/README.md create mode 100644 node_modules/supports-preserve-symlinks-flag/browser.js create mode 100644 node_modules/supports-preserve-symlinks-flag/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/package.json create mode 100644 node_modules/supports-preserve-symlinks-flag/test/index.js delete mode 100644 node_modules/symbol-tree/LICENSE delete mode 100644 node_modules/symbol-tree/README.md delete mode 100644 node_modules/symbol-tree/lib/SymbolTree.js delete mode 100644 node_modules/symbol-tree/lib/SymbolTreeNode.js delete mode 100644 node_modules/symbol-tree/lib/TreeIterator.js delete mode 100644 node_modules/symbol-tree/lib/TreePosition.js delete mode 100644 node_modules/symbol-tree/package.json delete mode 100644 node_modules/terminal-link/index.d.ts delete mode 100644 node_modules/terminal-link/index.js delete mode 100644 node_modules/terminal-link/license delete mode 100644 node_modules/terminal-link/package.json delete mode 100644 node_modules/terminal-link/readme.md delete mode 100644 node_modules/throat/LICENSE delete mode 100644 node_modules/throat/README.md delete mode 100644 node_modules/throat/index.d.ts delete mode 100644 node_modules/throat/index.js delete mode 100644 node_modules/throat/index.js.flow delete mode 100644 node_modules/throat/package.json delete mode 100644 node_modules/tmpl/.travis.yml delete mode 100644 node_modules/to-object-path/LICENSE delete mode 100644 node_modules/to-object-path/README.md delete mode 100644 node_modules/to-object-path/index.js delete mode 100644 node_modules/to-object-path/node_modules/kind-of/LICENSE delete mode 100644 node_modules/to-object-path/node_modules/kind-of/README.md delete mode 100644 node_modules/to-object-path/node_modules/kind-of/index.js delete mode 100644 node_modules/to-object-path/node_modules/kind-of/package.json delete mode 100644 node_modules/to-object-path/package.json delete mode 100644 node_modules/to-regex/LICENSE delete mode 100644 node_modules/to-regex/README.md delete mode 100644 node_modules/to-regex/index.js delete mode 100644 node_modules/to-regex/package.json delete mode 100644 node_modules/tough-cookie/LICENSE delete mode 100644 node_modules/tough-cookie/README.md delete mode 100644 node_modules/tough-cookie/lib/cookie.js delete mode 100644 node_modules/tough-cookie/lib/memstore.js delete mode 100644 node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/tough-cookie/lib/store.js delete mode 100644 node_modules/tough-cookie/lib/version.js delete mode 100644 node_modules/tough-cookie/package.json delete mode 100644 node_modules/tr46/LICENSE.md delete mode 100644 node_modules/tr46/README.md delete mode 100644 node_modules/tr46/index.js delete mode 100644 node_modules/tr46/lib/mappingTable.json delete mode 100644 node_modules/tr46/lib/regexes.js delete mode 100644 node_modules/tr46/lib/statusMapping.js delete mode 100644 node_modules/tr46/package.json delete mode 100644 node_modules/tunnel-agent/LICENSE delete mode 100644 node_modules/tunnel-agent/README.md delete mode 100644 node_modules/tunnel-agent/index.js delete mode 100644 node_modules/tunnel-agent/package.json delete mode 100644 node_modules/tweetnacl/.npmignore delete mode 100644 node_modules/tweetnacl/AUTHORS.md delete mode 100644 node_modules/tweetnacl/CHANGELOG.md delete mode 100644 node_modules/tweetnacl/LICENSE delete mode 100644 node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md delete mode 100644 node_modules/tweetnacl/README.md delete mode 100644 node_modules/tweetnacl/nacl-fast.js delete mode 100644 node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 node_modules/tweetnacl/nacl.d.ts delete mode 100644 node_modules/tweetnacl/nacl.js delete mode 100644 node_modules/tweetnacl/nacl.min.js delete mode 100644 node_modules/tweetnacl/package.json delete mode 100644 node_modules/typedarray-to-buffer/.airtap.yml delete mode 100644 node_modules/typedarray-to-buffer/.travis.yml delete mode 100644 node_modules/typedarray-to-buffer/LICENSE delete mode 100644 node_modules/typedarray-to-buffer/README.md delete mode 100644 node_modules/typedarray-to-buffer/index.js delete mode 100644 node_modules/typedarray-to-buffer/package.json delete mode 100644 node_modules/typedarray-to-buffer/test/basic.js delete mode 100644 node_modules/union-value/LICENSE delete mode 100644 node_modules/union-value/README.md delete mode 100644 node_modules/union-value/index.js delete mode 100644 node_modules/union-value/package.json delete mode 100644 node_modules/universalify/LICENSE delete mode 100644 node_modules/universalify/README.md delete mode 100644 node_modules/universalify/index.js delete mode 100644 node_modules/universalify/package.json delete mode 100644 node_modules/unset-value/LICENSE delete mode 100644 node_modules/unset-value/README.md delete mode 100644 node_modules/unset-value/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-value/README.md delete mode 100644 node_modules/unset-value/node_modules/has-value/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json delete mode 100644 node_modules/unset-value/node_modules/has-value/package.json delete mode 100644 node_modules/unset-value/node_modules/has-values/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-values/README.md delete mode 100644 node_modules/unset-value/node_modules/has-values/index.js delete mode 100644 node_modules/unset-value/node_modules/has-values/package.json delete mode 100644 node_modules/unset-value/package.json create mode 100644 node_modules/update-browserslist-db/LICENSE create mode 100644 node_modules/update-browserslist-db/README.md create mode 100644 node_modules/update-browserslist-db/check-npm-version.js create mode 100755 node_modules/update-browserslist-db/cli.js create mode 100644 node_modules/update-browserslist-db/index.d.ts create mode 100644 node_modules/update-browserslist-db/index.js create mode 100644 node_modules/update-browserslist-db/package.json create mode 100644 node_modules/update-browserslist-db/utils.js delete mode 100644 node_modules/urix/.jshintrc delete mode 100644 node_modules/urix/LICENSE delete mode 100644 node_modules/urix/index.js delete mode 100644 node_modules/urix/package.json delete mode 100644 node_modules/urix/readme.md delete mode 100644 node_modules/urix/test/index.js delete mode 100644 node_modules/use/LICENSE delete mode 100644 node_modules/use/README.md delete mode 100644 node_modules/use/index.js delete mode 100644 node_modules/use/package.json delete mode 100644 node_modules/uuid/CHANGELOG.md delete mode 100644 node_modules/uuid/CONTRIBUTING.md delete mode 100644 node_modules/uuid/LICENSE.md delete mode 100644 node_modules/uuid/README.md delete mode 100755 node_modules/uuid/dist/bin/uuid delete mode 100644 node_modules/uuid/dist/esm-browser/index.js delete mode 100644 node_modules/uuid/dist/esm-browser/md5.js delete mode 100644 node_modules/uuid/dist/esm-browser/nil.js delete mode 100644 node_modules/uuid/dist/esm-browser/parse.js delete mode 100644 node_modules/uuid/dist/esm-browser/regex.js delete mode 100644 node_modules/uuid/dist/esm-browser/rng.js delete mode 100644 node_modules/uuid/dist/esm-browser/sha1.js delete mode 100644 node_modules/uuid/dist/esm-browser/stringify.js delete mode 100644 node_modules/uuid/dist/esm-browser/v1.js delete mode 100644 node_modules/uuid/dist/esm-browser/v3.js delete mode 100644 node_modules/uuid/dist/esm-browser/v35.js delete mode 100644 node_modules/uuid/dist/esm-browser/v4.js delete mode 100644 node_modules/uuid/dist/esm-browser/v5.js delete mode 100644 node_modules/uuid/dist/esm-browser/validate.js delete mode 100644 node_modules/uuid/dist/esm-browser/version.js delete mode 100644 node_modules/uuid/dist/esm-node/index.js delete mode 100644 node_modules/uuid/dist/esm-node/md5.js delete mode 100644 node_modules/uuid/dist/esm-node/nil.js delete mode 100644 node_modules/uuid/dist/esm-node/parse.js delete mode 100644 node_modules/uuid/dist/esm-node/regex.js delete mode 100644 node_modules/uuid/dist/esm-node/rng.js delete mode 100644 node_modules/uuid/dist/esm-node/sha1.js delete mode 100644 node_modules/uuid/dist/esm-node/stringify.js delete mode 100644 node_modules/uuid/dist/esm-node/v1.js delete mode 100644 node_modules/uuid/dist/esm-node/v3.js delete mode 100644 node_modules/uuid/dist/esm-node/v35.js delete mode 100644 node_modules/uuid/dist/esm-node/v4.js delete mode 100644 node_modules/uuid/dist/esm-node/v5.js delete mode 100644 node_modules/uuid/dist/esm-node/validate.js delete mode 100644 node_modules/uuid/dist/esm-node/version.js delete mode 100644 node_modules/uuid/dist/index.js delete mode 100644 node_modules/uuid/dist/md5-browser.js delete mode 100644 node_modules/uuid/dist/md5.js delete mode 100644 node_modules/uuid/dist/nil.js delete mode 100644 node_modules/uuid/dist/parse.js delete mode 100644 node_modules/uuid/dist/regex.js delete mode 100644 node_modules/uuid/dist/rng-browser.js delete mode 100644 node_modules/uuid/dist/rng.js delete mode 100644 node_modules/uuid/dist/sha1-browser.js delete mode 100644 node_modules/uuid/dist/sha1.js delete mode 100644 node_modules/uuid/dist/stringify.js delete mode 100644 node_modules/uuid/dist/umd/uuid.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidNIL.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidParse.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidStringify.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidValidate.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidVersion.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidv1.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidv3.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidv4.min.js delete mode 100644 node_modules/uuid/dist/umd/uuidv5.min.js delete mode 100644 node_modules/uuid/dist/uuid-bin.js delete mode 100644 node_modules/uuid/dist/v1.js delete mode 100644 node_modules/uuid/dist/v3.js delete mode 100644 node_modules/uuid/dist/v35.js delete mode 100644 node_modules/uuid/dist/v4.js delete mode 100644 node_modules/uuid/dist/v5.js delete mode 100644 node_modules/uuid/dist/validate.js delete mode 100644 node_modules/uuid/dist/version.js delete mode 100644 node_modules/uuid/package.json delete mode 100644 node_modules/uuid/wrapper.mjs create mode 100644 node_modules/v8-to-istanbul/lib/range.js create mode 100644 node_modules/v8-to-istanbul/node_modules/convert-source-map/LICENSE create mode 100644 node_modules/v8-to-istanbul/node_modules/convert-source-map/README.md create mode 100644 node_modules/v8-to-istanbul/node_modules/convert-source-map/index.js create mode 100644 node_modules/v8-to-istanbul/node_modules/convert-source-map/package.json delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/LICENSE delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/README.md delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/mappings.wasm delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/read-wasm.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/util.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/lib/wasm.js delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/package.json delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/source-map.d.ts delete mode 100644 node_modules/v8-to-istanbul/node_modules/source-map/source-map.js delete mode 100644 node_modules/validate-npm-package-license/LICENSE delete mode 100644 node_modules/validate-npm-package-license/README.md delete mode 100644 node_modules/validate-npm-package-license/index.js delete mode 100644 node_modules/validate-npm-package-license/package.json delete mode 100644 node_modules/verror/.npmignore delete mode 100644 node_modules/verror/CHANGES.md delete mode 100644 node_modules/verror/CONTRIBUTING.md delete mode 100644 node_modules/verror/LICENSE delete mode 100644 node_modules/verror/README.md delete mode 100644 node_modules/verror/lib/verror.js delete mode 100644 node_modules/verror/package.json delete mode 100644 node_modules/w3c-hr-time/CHANGELOG.md delete mode 100644 node_modules/w3c-hr-time/LICENSE.md delete mode 100644 node_modules/w3c-hr-time/README.md delete mode 100644 node_modules/w3c-hr-time/index.js delete mode 100644 node_modules/w3c-hr-time/lib/calculate-clock-offset.js delete mode 100644 node_modules/w3c-hr-time/lib/clock-is-accurate.js delete mode 100644 node_modules/w3c-hr-time/lib/global-monotonic-clock.js delete mode 100644 node_modules/w3c-hr-time/lib/performance.js delete mode 100644 node_modules/w3c-hr-time/lib/utils.js delete mode 100644 node_modules/w3c-hr-time/package.json delete mode 100644 node_modules/w3c-xmlserializer/LICENSE.md delete mode 100644 node_modules/w3c-xmlserializer/README.md delete mode 100644 node_modules/w3c-xmlserializer/lib/attributes.js delete mode 100644 node_modules/w3c-xmlserializer/lib/constants.js delete mode 100644 node_modules/w3c-xmlserializer/lib/serialize.js delete mode 100644 node_modules/w3c-xmlserializer/package.json delete mode 100644 node_modules/webidl-conversions/LICENSE.md delete mode 100644 node_modules/webidl-conversions/README.md delete mode 100644 node_modules/webidl-conversions/lib/index.js delete mode 100644 node_modules/webidl-conversions/package.json delete mode 100644 node_modules/whatwg-encoding/LICENSE.txt delete mode 100644 node_modules/whatwg-encoding/README.md delete mode 100644 node_modules/whatwg-encoding/lib/labels-to-names.json delete mode 100644 node_modules/whatwg-encoding/lib/supported-names.json delete mode 100644 node_modules/whatwg-encoding/lib/whatwg-encoding.js delete mode 100644 node_modules/whatwg-encoding/package.json delete mode 100644 node_modules/whatwg-mimetype/LICENSE.txt delete mode 100644 node_modules/whatwg-mimetype/README.md delete mode 100644 node_modules/whatwg-mimetype/lib/mime-type.js delete mode 100644 node_modules/whatwg-mimetype/lib/parser.js delete mode 100644 node_modules/whatwg-mimetype/lib/serializer.js delete mode 100644 node_modules/whatwg-mimetype/lib/utils.js delete mode 100644 node_modules/whatwg-mimetype/package.json delete mode 100644 node_modules/whatwg-url/LICENSE.txt delete mode 100644 node_modules/whatwg-url/README.md delete mode 100644 node_modules/whatwg-url/dist/Function.js delete mode 100644 node_modules/whatwg-url/dist/URL-impl.js delete mode 100644 node_modules/whatwg-url/dist/URL.js delete mode 100644 node_modules/whatwg-url/dist/URLSearchParams-impl.js delete mode 100644 node_modules/whatwg-url/dist/URLSearchParams.js delete mode 100644 node_modules/whatwg-url/dist/VoidFunction.js delete mode 100644 node_modules/whatwg-url/dist/encoding.js delete mode 100644 node_modules/whatwg-url/dist/infra.js delete mode 100644 node_modules/whatwg-url/dist/percent-encoding.js delete mode 100644 node_modules/whatwg-url/dist/url-state-machine.js delete mode 100644 node_modules/whatwg-url/dist/urlencoded.js delete mode 100644 node_modules/whatwg-url/dist/utils.js delete mode 100644 node_modules/whatwg-url/index.js delete mode 100644 node_modules/whatwg-url/package.json delete mode 100644 node_modules/whatwg-url/webidl2js-wrapper.js delete mode 100644 node_modules/which-module/CHANGELOG.md delete mode 100644 node_modules/which-module/LICENSE delete mode 100644 node_modules/which-module/README.md delete mode 100644 node_modules/which-module/index.js delete mode 100644 node_modules/which-module/package.json delete mode 100644 node_modules/write-file-atomic/CHANGELOG.md rename node_modules/write-file-atomic/{LICENSE => LICENSE.md} (100%) delete mode 100644 node_modules/write-file-atomic/index.js create mode 100644 node_modules/write-file-atomic/lib/index.js delete mode 100644 node_modules/ws/LICENSE delete mode 100644 node_modules/ws/README.md delete mode 100644 node_modules/ws/browser.js delete mode 100644 node_modules/ws/index.js delete mode 100644 node_modules/ws/lib/buffer-util.js delete mode 100644 node_modules/ws/lib/constants.js delete mode 100644 node_modules/ws/lib/event-target.js delete mode 100644 node_modules/ws/lib/extension.js delete mode 100644 node_modules/ws/lib/limiter.js delete mode 100644 node_modules/ws/lib/permessage-deflate.js delete mode 100644 node_modules/ws/lib/receiver.js delete mode 100644 node_modules/ws/lib/sender.js delete mode 100644 node_modules/ws/lib/stream.js delete mode 100644 node_modules/ws/lib/validation.js delete mode 100644 node_modules/ws/lib/websocket-server.js delete mode 100644 node_modules/ws/lib/websocket.js delete mode 100644 node_modules/ws/package.json delete mode 100644 node_modules/xml-name-validator/LICENSE.txt delete mode 100644 node_modules/xml-name-validator/README.md delete mode 100644 node_modules/xml-name-validator/lib/generated-parser.js delete mode 100644 node_modules/xml-name-validator/lib/grammar.pegjs delete mode 100644 node_modules/xml-name-validator/lib/xml-name-validator.js delete mode 100644 node_modules/xml-name-validator/package.json delete mode 100644 node_modules/xmlchars/LICENSE delete mode 100644 node_modules/xmlchars/README.md delete mode 100644 node_modules/xmlchars/package.json delete mode 100644 node_modules/xmlchars/xml/1.0/ed4.d.ts delete mode 100644 node_modules/xmlchars/xml/1.0/ed4.js delete mode 100644 node_modules/xmlchars/xml/1.0/ed4.js.map delete mode 100644 node_modules/xmlchars/xml/1.0/ed5.d.ts delete mode 100644 node_modules/xmlchars/xml/1.0/ed5.js delete mode 100644 node_modules/xmlchars/xml/1.0/ed5.js.map delete mode 100644 node_modules/xmlchars/xml/1.1/ed2.d.ts delete mode 100644 node_modules/xmlchars/xml/1.1/ed2.js delete mode 100644 node_modules/xmlchars/xml/1.1/ed2.js.map delete mode 100644 node_modules/xmlchars/xmlchars.d.ts delete mode 100644 node_modules/xmlchars/xmlchars.js delete mode 100644 node_modules/xmlchars/xmlchars.js.map delete mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.d.ts delete mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js delete mode 100644 node_modules/xmlchars/xmlns/1.0/ed3.js.map create mode 100644 node_modules/y18n/build/index.cjs create mode 100644 node_modules/y18n/build/lib/cjs.js create mode 100644 node_modules/y18n/build/lib/index.js create mode 100644 node_modules/y18n/build/lib/platform-shims/node.js delete mode 100644 node_modules/y18n/index.js create mode 100644 node_modules/y18n/index.mjs create mode 100644 node_modules/yargs-parser/browser.js create mode 100644 node_modules/yargs-parser/build/index.cjs create mode 100644 node_modules/yargs-parser/build/lib/index.js create mode 100644 node_modules/yargs-parser/build/lib/string-utils.js create mode 100644 node_modules/yargs-parser/build/lib/tokenize-arg-string.js create mode 100644 node_modules/yargs-parser/build/lib/yargs-parser-types.js create mode 100644 node_modules/yargs-parser/build/lib/yargs-parser.js delete mode 100644 node_modules/yargs-parser/index.js delete mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js delete mode 100644 node_modules/yargs/CHANGELOG.md create mode 100644 node_modules/yargs/browser.d.ts create mode 100644 node_modules/yargs/browser.mjs create mode 100644 node_modules/yargs/build/index.cjs delete mode 100644 node_modules/yargs/build/lib/apply-extends.d.ts delete mode 100644 node_modules/yargs/build/lib/apply-extends.js delete mode 100644 node_modules/yargs/build/lib/argsert.d.ts delete mode 100644 node_modules/yargs/build/lib/command.d.ts delete mode 100644 node_modules/yargs/build/lib/common-types.d.ts delete mode 100644 node_modules/yargs/build/lib/common-types.js delete mode 100644 node_modules/yargs/build/lib/completion-templates.d.ts delete mode 100644 node_modules/yargs/build/lib/completion.d.ts delete mode 100644 node_modules/yargs/build/lib/is-promise.d.ts delete mode 100644 node_modules/yargs/build/lib/is-promise.js delete mode 100644 node_modules/yargs/build/lib/levenshtein.d.ts delete mode 100644 node_modules/yargs/build/lib/levenshtein.js delete mode 100644 node_modules/yargs/build/lib/middleware.d.ts delete mode 100644 node_modules/yargs/build/lib/obj-filter.d.ts delete mode 100644 node_modules/yargs/build/lib/obj-filter.js delete mode 100644 node_modules/yargs/build/lib/parse-command.d.ts delete mode 100644 node_modules/yargs/build/lib/process-argv.d.ts delete mode 100644 node_modules/yargs/build/lib/process-argv.js create mode 100644 node_modules/yargs/build/lib/typings/common-types.js create mode 100644 node_modules/yargs/build/lib/typings/yargs-parser-types.js delete mode 100644 node_modules/yargs/build/lib/usage.d.ts create mode 100644 node_modules/yargs/build/lib/utils/apply-extends.js create mode 100644 node_modules/yargs/build/lib/utils/is-promise.js create mode 100644 node_modules/yargs/build/lib/utils/levenshtein.js create mode 100644 node_modules/yargs/build/lib/utils/maybe-async-result.js create mode 100644 node_modules/yargs/build/lib/utils/obj-filter.js create mode 100644 node_modules/yargs/build/lib/utils/process-argv.js create mode 100644 node_modules/yargs/build/lib/utils/set-blocking.js create mode 100644 node_modules/yargs/build/lib/utils/which-module.js delete mode 100644 node_modules/yargs/build/lib/validation.d.ts create mode 100644 node_modules/yargs/build/lib/yargs-factory.js delete mode 100644 node_modules/yargs/build/lib/yargs.d.ts delete mode 100644 node_modules/yargs/build/lib/yargs.js delete mode 100644 node_modules/yargs/build/lib/yerror.d.ts create mode 100644 node_modules/yargs/helpers/helpers.mjs create mode 100644 node_modules/yargs/helpers/index.js create mode 100644 node_modules/yargs/helpers/package.json create mode 100644 node_modules/yargs/index.cjs delete mode 100644 node_modules/yargs/index.js create mode 100644 node_modules/yargs/index.mjs create mode 100644 node_modules/yargs/lib/platform-shims/browser.mjs create mode 100644 node_modules/yargs/lib/platform-shims/esm.mjs create mode 100644 node_modules/yargs/locales/cs.json create mode 100644 node_modules/yargs/locales/uk_UA.json create mode 100644 node_modules/yargs/locales/uz.json create mode 100644 node_modules/yargs/yargs delete mode 100644 node_modules/yargs/yargs.js create mode 100644 node_modules/yargs/yargs.mjs create mode 100644 node_modules/yocto-queue/index.d.ts create mode 100644 node_modules/yocto-queue/index.js rename node_modules/{is-docker => yocto-queue}/license (100%) create mode 100644 node_modules/yocto-queue/package.json create mode 100644 node_modules/yocto-queue/readme.md diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob deleted file mode 120000 index a68344a3..00000000 --- a/node_modules/.bin/atob +++ /dev/null @@ -1 +0,0 @@ -../atob/bin/atob.js \ No newline at end of file diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen deleted file mode 120000 index 01a7c325..00000000 --- a/node_modules/.bin/escodegen +++ /dev/null @@ -1 +0,0 @@ -../escodegen/bin/escodegen.js \ No newline at end of file diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate deleted file mode 120000 index 7d0293e6..00000000 --- a/node_modules/.bin/esgenerate +++ /dev/null @@ -1 +0,0 @@ -../escodegen/bin/esgenerate.js \ No newline at end of file diff --git a/node_modules/.bin/is-ci b/node_modules/.bin/is-ci deleted file mode 120000 index fe6aca6f..00000000 --- a/node_modules/.bin/is-ci +++ /dev/null @@ -1 +0,0 @@ -../is-ci/bin.js \ No newline at end of file diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker deleted file mode 120000 index 9896ba57..00000000 --- a/node_modules/.bin/is-docker +++ /dev/null @@ -1 +0,0 @@ -../is-docker/cli.js \ No newline at end of file diff --git a/node_modules/.bin/jest-runtime b/node_modules/.bin/jest-runtime deleted file mode 120000 index ec00171e..00000000 --- a/node_modules/.bin/jest-runtime +++ /dev/null @@ -1 +0,0 @@ -../jest-runtime/bin/jest-runtime.js \ No newline at end of file diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 00000000..b6afda6c --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.bin/sane b/node_modules/.bin/sane deleted file mode 120000 index ab4163ba..00000000 --- a/node_modules/.bin/sane +++ /dev/null @@ -1 +0,0 @@ -../sane/src/cli.js \ No newline at end of file diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv deleted file mode 120000 index a2a295c8..00000000 --- a/node_modules/.bin/sshpk-conv +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign deleted file mode 120000 index 766b9b3a..00000000 --- a/node_modules/.bin/sshpk-sign +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify deleted file mode 120000 index bfd7e3ad..00000000 --- a/node_modules/.bin/sshpk-verify +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/node_modules/.bin/update-browserslist-db b/node_modules/.bin/update-browserslist-db new file mode 120000 index 00000000..b11e16f3 --- /dev/null +++ b/node_modules/.bin/update-browserslist-db @@ -0,0 +1 @@ +../update-browserslist-db/cli.js \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 120000 index 588f70ec..00000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/.bin/watch b/node_modules/.bin/watch deleted file mode 120000 index 6c62430b..00000000 --- a/node_modules/.bin/watch +++ /dev/null @@ -1 +0,0 @@ -../@cnakazawa/watch/cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..2fc198ab --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,4575 @@ +{ + "name": "github-actions-mobsuccess", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@actions/core": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" + }, + "node_modules/@actions/github": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", + "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "dependencies": { + "@actions/http-client": "^1.0.8", + "@octokit/core": "^3.0.0", + "@octokit/plugin-paginate-rest": "^2.2.3", + "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + } + }, + "node_modules/@actions/http-client": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", + "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", + "dependencies": { + "tunnel": "0.0.6" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.22.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.3.tgz", + "integrity": "sha512-aNtko9OPOwVESUFp3MZfD8Uzxl7JzSeJpd7npIoxCasU37PFbAQRpKglkaKwlHOyeJdrREpo8TW8ldrkYWwvIQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.1.tgz", + "integrity": "sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.22.0", + "@babel/helper-compilation-targets": "^7.22.1", + "@babel/helper-module-transforms": "^7.22.1", + "@babel/helpers": "^7.22.0", + "@babel/parser": "^7.22.0", + "@babel/template": "^7.21.9", + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.22.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.3.tgz", + "integrity": "sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.3", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.1.tgz", + "integrity": "sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.0", + "@babel/helper-validator-option": "^7.21.0", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz", + "integrity": "sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", + "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", + "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.21.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.22.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.1.tgz", + "integrity": "sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.1", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.21.9", + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz", + "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.21.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.3.tgz", + "integrity": "sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.21.9", + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz", + "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", + "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz", + "integrity": "sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.21.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz", + "integrity": "sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.21.4", + "@babel/parser": "^7.21.9", + "@babel/types": "^7.21.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.22.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz", + "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.22.3", + "@babel/helper-environment-visitor": "^7.22.1", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.22.4", + "@babel/types": "^7.22.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.22.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz", + "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.21.5", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", + "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", + "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.5.0", + "@jest/reporters": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-resolve-dependencies": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "jest-watcher": "^29.5.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.5.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", + "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "jest-mock": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", + "dev": true, + "dependencies": { + "expect": "^29.5.0", + "jest-snapshot": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", + "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.4.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", + "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", + "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/types": "^29.5.0", + "jest-mock": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", + "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", + "@jridgewell/trace-mapping": "^0.3.15", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", + "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.25.16" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", + "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.15", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", + "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", + "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.5.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.5.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", + "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.5.0", + "@jridgewell/trace-mapping": "^0.3.15", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", + "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.4.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@octokit/auth-token": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.3.2.tgz", + "integrity": "sha512-Jx83n4tuX/z7QtxnPsAKxXPzH3vANtKmlCB3W3vt18JbkEaBYm+C8dgAlA1FNtqNk3L21pxsKNbWkUQAhiV7ng==", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.4.12", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", + "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz", + "integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==", + "dependencies": { + "@octokit/request": "^5.3.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-6.0.0.tgz", + "integrity": "sha512-CnDdK7ivHkBtJYzWzZm7gEkanA7gKH6a09Eguz7flHw//GacPJLmkHA3f3N++MJmlxD1Fl+mB7B32EEpSCwztQ==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz", + "integrity": "sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg==", + "dependencies": { + "@octokit/types": "^6.11.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.0.tgz", + "integrity": "sha512-1AF9GM/Ywk8ukUM5seDRj286GdFpdfsHeOrOPBV2rVtRN7MQNzRIcw8W5sb4JPerjQ0WcRRwAwQyufg64BxJkA==", + "dependencies": { + "@octokit/types": "^6.13.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/request": { + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz", + "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^6.7.1", + "deprecation": "^2.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "once": "^1.4.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", + "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.13.0.tgz", + "integrity": "sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA==", + "dependencies": { + "@octokit/openapi-types": "^6.0.0" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.25.24", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", + "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", + "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/node": { + "version": "20.2.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-jest": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", + "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.5.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.5.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.5.0", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/before-after-hook": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.0.tgz", + "integrity": "sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", + "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001489", + "electron-to-chromium": "^1.4.411", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001494", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001494.tgz", + "integrity": "sha512-sY2B5Qyl46ZzfYDegrl8GBCzdawSLT4ThM9b9F+aDYUrAG2zCOyMbd2Tq34mS1g4ZKBfjRlzOohQMxx28x6wJg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", + "dev": true + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.419", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.419.tgz", + "integrity": "sha512-jdie3RiEgygvDTyS2sgjq71B36q2cDSBfPlwzUyuOrfYTNoYWyBxxjGJV/HAu3A2hB0Y+HesvCVkVAFoCKwCSw==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", + "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", + "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", + "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", + "dev": true, + "dependencies": { + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", + "import-local": "^3.0.2", + "jest-cli": "^29.5.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", + "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/expect": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.5.0", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.5.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", + "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", + "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.5.0", + "@jest/types": "^29.5.0", + "babel-jest": "^29.5.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.5.0", + "jest-environment-node": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-runner": "^29.5.0", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.5.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", + "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", + "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "jest-util": "^29.5.0", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", + "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "jest-mock": "^29.5.0", + "jest-util": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", + "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.5.0", + "jest-worker": "^29.5.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", + "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", + "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", + "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.5.0", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.5.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util/node_modules/@babel/code-frame": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/jest-mock": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", + "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "@types/node": "*", + "jest-util": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", + "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.5.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.5.0", + "jest-validate": "^29.5.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", + "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", + "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.5.0", + "@jest/environment": "^29.5.0", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.5.0", + "jest-haste-map": "^29.5.0", + "jest-leak-detector": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-resolve": "^29.5.0", + "jest-runtime": "^29.5.0", + "jest-util": "^29.5.0", + "jest-watcher": "^29.5.0", + "jest-worker": "^29.5.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", + "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.5.0", + "@jest/fake-timers": "^29.5.0", + "@jest/globals": "^29.5.0", + "@jest/source-map": "^29.4.3", + "@jest/test-result": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-mock": "^29.5.0", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.5.0", + "jest-snapshot": "^29.5.0", + "jest-util": "^29.5.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", + "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.5.0", + "@jest/transform": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.5.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.5.0", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.5.0", + "jest-message-util": "^29.5.0", + "jest-util": "^29.5.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.5.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", + "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", + "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.5.0", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.4.3", + "leven": "^3.1.0", + "pretty-format": "^29.5.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", + "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.5.0", + "@jest/types": "^29.5.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.5.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", + "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.5.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/pretty-format": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", + "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.4.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", + "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table": { + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", + "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.4.tgz", + "integrity": "sha512-v1qwknPv7rNGqtiaC4ywb3OZ3LNrEjbJL5igAe8eTbXOj8ye0XVul2pFRulwl/j3QfUKdQ/J9HZaYfQCnR7cvA==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/node_modules/spdx-correct/LICENSE b/node_modules/@ampproject/remapping/LICENSE similarity index 100% rename from node_modules/spdx-correct/LICENSE rename to node_modules/@ampproject/remapping/LICENSE diff --git a/node_modules/@ampproject/remapping/README.md b/node_modules/@ampproject/remapping/README.md new file mode 100644 index 00000000..1463c9f6 --- /dev/null +++ b/node_modules/@ampproject/remapping/README.md @@ -0,0 +1,218 @@ +# @ampproject/remapping + +> Remap sequential sourcemaps through transformations to point at the original source code + +Remapping allows you to take the sourcemaps generated through transforming your code and "remap" +them to the original source locations. Think "my minified code, transformed with babel and bundled +with webpack", all pointing to the correct location in your original source code. + +With remapping, none of your source code transformations need to be aware of the input's sourcemap, +they only need to generate an output sourcemap. This greatly simplifies building custom +transformations (think a find-and-replace). + +## Installation + +```sh +npm install @ampproject/remapping +``` + +## Usage + +```typescript +function remapping( + map: SourceMap | SourceMap[], + loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined), + options?: { excludeContent: boolean, decodedMappings: boolean } +): SourceMap; + +// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the +// "source" location (where child sources are resolved relative to, or the location of original +// source), and the ability to override the "content" of an original source for inclusion in the +// output sourcemap. +type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; +} +``` + +`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer +in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents +a transformed file (it has a sourcmap associated with it), then the `loader` should return that +sourcemap. If not, the path will be treated as an original, untransformed source code. + +```js +// Babel transformed "helloworld.js" into "transformed.js" +const transformedMap = JSON.stringify({ + file: 'transformed.js', + // 1st column of 2nd line of output file translates into the 1st source + // file, line 3, column 2 + mappings: ';CAEE', + sources: ['helloworld.js'], + version: 3, +}); + +// Uglify minified "transformed.js" into "transformed.min.js" +const minifiedTransformedMap = JSON.stringify({ + file: 'transformed.min.js', + // 0th column of 1st line of output file translates into the 1st source + // file, line 2, column 1. + mappings: 'AACC', + names: [], + sources: ['transformed.js'], + version: 3, +}); + +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + // The "transformed.js" file is an transformed file. + if (file === 'transformed.js') { + // The root importer is empty. + console.assert(ctx.importer === ''); + // The depth in the sourcemap tree we're currently loading. + // The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc. + console.assert(ctx.depth === 1); + + return transformedMap; + } + + // Loader will be called to load transformedMap's source file pointers as well. + console.assert(file === 'helloworld.js'); + // `transformed.js`'s sourcemap points into `helloworld.js`. + console.assert(ctx.importer === 'transformed.js'); + // This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`. + console.assert(ctx.depth === 2); + return null; + } +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +In this example, `loader` will be called twice: + +1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the + associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can + be traced through it into the source files it represents. +2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so + we return `null`. + +The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If +you were to read the `mappings`, it says "0th column of the first line output line points to the 1st +column of the 2nd line of the file `helloworld.js`". + +### Multiple transformations of a file + +As a convenience, if you have multiple single-source transformations of a file, you may pass an +array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this +changes the `importer` and `depth` of each call to our loader. So our above example could have been +written as: + +```js +const remapped = remapping( + [minifiedTransformedMap, transformedMap], + () => null +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +### Advanced control of the loading graph + +#### `source` + +The `source` property can overridden to any value to change the location of the current load. Eg, +for an original source file, it allows us to change the location to the original source regardless +of what the sourcemap source entry says. And for transformed files, it allows us to change the +relative resolving location for child sources of the loaded sourcemap. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // We pretend the transformed.js file actually exists in the 'src/' directory. When the nested + // source files are loaded, they will now be relative to `src/`. + ctx.source = 'src/transformed.js'; + return transformedMap; + } + + console.assert(file === 'src/helloworld.js'); + // We could futher change the source of this original file, eg, to be inside a nested directory + // itself. This will be reflected in the remapped sourcemap. + ctx.source = 'src/nested/transformed.js'; + return null; + } +); + +console.log(remapped); +// { +// …, +// sources: ['src/nested/helloworld.js'], +// }; +``` + + +#### `content` + +The `content` property can be overridden when we encounter an original source file. Eg, this allows +you to manually provide the source content of the original file regardless of whether the +`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove +the source content. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap + // would not include any `sourcesContent` values. + return transformedMap; + } + + console.assert(file === 'helloworld.js'); + // We can read the file to provide the source content. + ctx.content = fs.readFileSync(file, 'utf8'); + return null; + } +); + +console.log(remapped); +// { +// …, +// sourcesContent: [ +// 'console.log("Hello world!")', +// ], +// }; +``` + +### Options + +#### excludeContent + +By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the +`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce +the size out the sourcemap. + +#### decodedMappings + +By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the +`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of +encoding into a VLQ string. diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs b/node_modules/@ampproject/remapping/dist/remapping.mjs new file mode 100644 index 00000000..b5eddeda --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs @@ -0,0 +1,191 @@ +import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping'; +import { GenMapping, maybeAddSegment, setSourceContent, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; + +const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null); +const EMPTY_SOURCES = []; +function SegmentObject(source, line, column, name, content) { + return { source, line, column, name, content }; +} +function Source(map, sources, source, content) { + return { + map, + sources, + source, + content, + }; +} +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +function MapSource(map, sources) { + return Source(map, sources, '', null); +} +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +function OriginalSource(source, content) { + return Source(null, EMPTY_SOURCES, source, content); +} +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source } = traced; + maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + setSourceContent(gen, source, content); + } + } + return gen; +} +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content); + } + const segment = traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); +} + +function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; +} +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; +} +function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + return OriginalSource(source, sourceContent); + }); + return MapSource(map, children); +} + +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } +} + +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); +} + +export { remapping as default }; +//# sourceMappingURL=remapping.mjs.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs.map b/node_modules/@ampproject/remapping/dist/remapping.mjs.map new file mode 100644 index 00000000..078a2b73 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.mjs","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null\n): SourceMapSegmentObject {\n return { source, line, column, name, content };\n}\n\nfunction Source(map: TraceMap, sources: Sources[], source: '', content: null): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(source: string, content: string | null): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n return OriginalSource(source, sourceContent);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":[],"mappings":";;;AA6BA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AAC/E,MAAM,aAAa,GAAc,EAAE,CAAC;AAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EAAA;IAEtB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC;AASD,SAAS,MAAM,CACb,GAAoB,EACpB,OAAkB,EAClB,MAAmB,EACnB,OAAsB,EAAA;IAEtB,OAAO;QACL,GAAG;QAC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3C,QAAA,MAAM,GAAG,GAAG,OAAO,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC5E,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAC3B,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;AACrB,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAiC,CAAC;AACtD,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAA2B,CAAC;AAE7C,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;AAEjC,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAA+B,CAAC;AACnD,QAAA,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;AAC3B,YAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAA6C,CAAC;AACzE,SAAA;KACF;IAED,QAAQ,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;AACF;;ACpBD;;;;;;;;;;;;;;AAcG;AACqB,SAAA,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B,EAAA;IAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAClD;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js b/node_modules/@ampproject/remapping/dist/remapping.umd.js new file mode 100644 index 00000000..e292d4c3 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js @@ -0,0 +1,196 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@jridgewell/trace-mapping'), require('@jridgewell/gen-mapping')) : + typeof define === 'function' && define.amd ? define(['@jridgewell/trace-mapping', '@jridgewell/gen-mapping'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping)); +})(this, (function (traceMapping, genMapping) { 'use strict'; + + const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null); + const EMPTY_SOURCES = []; + function SegmentObject(source, line, column, name, content) { + return { source, line, column, name, content }; + } + function Source(map, sources, source, content) { + return { + map, + sources, + source, + content, + }; + } + /** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ + function MapSource(map, sources) { + return Source(map, sources, '', null); + } + /** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ + function OriginalSource(source, content) { + return Source(null, EMPTY_SOURCES, source, content); + } + /** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ + function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new genMapping.GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = traceMapping.decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source } = traced; + genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + genMapping.setSourceContent(gen, source, content); + } + } + return gen; + } + /** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ + function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content); + } + const segment = traceMapping.traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); + } + + function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; + } + /** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ + function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; + } + function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + return OriginalSource(source, sourceContent); + }); + return MapSource(map, children); + } + + /** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ + class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } + } + + /** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ + function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); + } + + return remapping; + +})); +//# sourceMappingURL=remapping.umd.js.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js.map b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map new file mode 100644 index 00000000..9c898880 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.umd.js","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null\n): SourceMapSegmentObject {\n return { source, line, column, name, content };\n}\n\nfunction Source(map: TraceMap, sources: Sources[], source: '', content: null): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(source: string, content: string | null): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n return OriginalSource(source, sourceContent);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":["GenMapping","decodedMappings","maybeAddSegment","setSourceContent","traceSegment","TraceMap","toDecodedMap","toEncodedMap"],"mappings":";;;;;;IA6BA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC/E,MAAM,aAAa,GAAc,EAAE,CAAC;IAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EAAA;QAEtB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACjD,CAAC;IASD,SAAS,MAAM,CACb,GAAoB,EACpB,OAAkB,EAClB,MAAmB,EACnB,OAAsB,EAAA;QAEtB,OAAO;YACL,GAAG;YACH,OAAO;YACP,MAAM;YACN,OAAO;SACD,CAAC;IACX,CAAC;IAED;;;IAGG;IACa,SAAA,SAAS,CAAC,GAAa,EAAE,OAAkB,EAAA;QACzD,OAAO,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;;;IAGG;IACa,SAAA,cAAc,CAAC,MAAc,EAAE,OAAsB,EAAA;QACnE,OAAO,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;IAGG;IACG,SAAU,aAAa,CAAC,IAAe,EAAA;;;IAG3C,IAAA,MAAM,GAAG,GAAG,IAAIA,qBAAU,CAAC,EAAE,IAA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AO,GAAG,GAAG,CAAC,OAA+B,CAAC;IACnD,QAAA,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;IAC3B,YAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAA6C,CAAC;IACzE,SAAA;SACF;QAED,QAAQ,GAAA;IACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SAC7B;IACF;;ICpBD;;;;;;;;;;;;;;IAcG;IACqB,SAAA,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B,EAAA;QAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAClD;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts new file mode 100644 index 00000000..f87fceab --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts @@ -0,0 +1,14 @@ +import type { MapSource as MapSourceType } from './source-map-tree'; +import type { SourceMapInput, SourceMapLoader } from './types'; +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType; diff --git a/node_modules/@ampproject/remapping/dist/types/remapping.d.ts b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts new file mode 100644 index 00000000..0b58ea9a --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts @@ -0,0 +1,19 @@ +import SourceMap from './source-map'; +import type { SourceMapInput, SourceMapLoader, Options } from './types'; +export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types'; +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts new file mode 100644 index 00000000..3a9f7af6 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts @@ -0,0 +1,42 @@ +import { GenMapping } from '@jridgewell/gen-mapping'; +import type { TraceMap } from '@jridgewell/trace-mapping'; +export declare type SourceMapSegmentObject = { + column: number; + line: number; + name: string; + source: string; + content: string | null; +}; +export declare type OriginalSource = { + map: null; + sources: Sources[]; + source: string; + content: string | null; +}; +export declare type MapSource = { + map: TraceMap; + sources: Sources[]; + source: string; + content: null; +}; +export declare type Sources = OriginalSource | MapSource; +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource; +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +export declare function OriginalSource(source: string, content: string | null): OriginalSource; +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +export declare function traceMappings(tree: MapSource): GenMapping; +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +export declare function originalPositionFor(source: Sources, line: number, column: number, name: string): SourceMapSegmentObject | null; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts new file mode 100644 index 00000000..ef999b75 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts @@ -0,0 +1,17 @@ +import type { GenMapping } from '@jridgewell/gen-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Options } from './types'; +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +export default class SourceMap { + file?: string | null; + mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; + sourceRoot?: string; + names: string[]; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + constructor(map: GenMapping, options: Options); + toString(): string; +} diff --git a/node_modules/@ampproject/remapping/dist/types/types.d.ts b/node_modules/@ampproject/remapping/dist/types/types.d.ts new file mode 100644 index 00000000..730a9637 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/types.d.ts @@ -0,0 +1,14 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping'; +export type { SourceMapInput }; +export declare type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; +}; +export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void; +export declare type Options = { + excludeContent?: boolean; + decodedMappings?: boolean; +}; diff --git a/node_modules/@ampproject/remapping/package.json b/node_modules/@ampproject/remapping/package.json new file mode 100644 index 00000000..bf3dad29 --- /dev/null +++ b/node_modules/@ampproject/remapping/package.json @@ -0,0 +1,75 @@ +{ + "name": "@ampproject/remapping", + "version": "2.2.1", + "description": "Remap sequential sourcemaps through transformations to point at the original source code", + "keywords": [ + "source", + "map", + "remap" + ], + "main": "dist/remapping.umd.js", + "module": "dist/remapping.mjs", + "types": "dist/types/remapping.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/remapping.d.ts", + "browser": "./dist/remapping.umd.js", + "require": "./dist/remapping.umd.js", + "import": "./dist/remapping.mjs" + }, + "./dist/remapping.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/ampproject/remapping.git" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "jest --coverage", + "test:watch": "jest --coverage --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.2", + "@types/jest": "27.4.1", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.14.0", + "eslint-config-prettier": "8.5.0", + "jest": "27.5.1", + "jest-config": "27.5.1", + "npm-run-all": "4.1.5", + "prettier": "2.6.2", + "rollup": "2.70.2", + "ts-jest": "27.1.4", + "tslib": "2.4.0", + "typescript": "4.6.3" + }, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } +} diff --git a/node_modules/@babel/compat-data/README.md b/node_modules/@babel/compat-data/README.md new file mode 100644 index 00000000..9f3abdec --- /dev/null +++ b/node_modules/@babel/compat-data/README.md @@ -0,0 +1,19 @@ +# @babel/compat-data + +> + +See our website [@babel/compat-data](https://babeljs.io/docs/en/babel-compat-data) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/compat-data +``` + +or using yarn: + +```sh +yarn add @babel/compat-data +``` diff --git a/node_modules/@babel/compat-data/corejs2-built-ins.js b/node_modules/@babel/compat-data/corejs2-built-ins.js index 68ce97ff..ed19e0b8 100644 --- a/node_modules/@babel/compat-data/corejs2-built-ins.js +++ b/node_modules/@babel/compat-data/corejs2-built-ins.js @@ -1 +1,2 @@ +// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2 module.exports = require("./data/corejs2-built-ins.json"); diff --git a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js index 6a85b4d9..7909b8c4 100644 --- a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +++ b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js @@ -1 +1,2 @@ +// Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3 module.exports = require("./data/corejs3-shipped-proposals.json"); diff --git a/node_modules/@babel/compat-data/data/corejs2-built-ins.json b/node_modules/@babel/compat-data/data/corejs2-built-ins.json index 9739da06..bf3be88e 100644 --- a/node_modules/@babel/compat-data/data/corejs2-built-ins.json +++ b/node_modules/@babel/compat-data/data/corejs2-built-ins.json @@ -6,8 +6,10 @@ "firefox": "32", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "5", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.every": { @@ -16,12 +18,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.fill": { @@ -31,8 +35,10 @@ "firefox": "31", "safari": "7.1", "node": "4", + "deno": "1", "ios": "8", "samsung": "5", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.filter": { @@ -42,6 +48,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -53,8 +60,10 @@ "firefox": "25", "safari": "7.1", "node": "4", + "deno": "1", "ios": "8", "samsung": "5", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.find-index": { @@ -64,8 +73,10 @@ "firefox": "25", "safari": "7.1", "node": "4", + "deno": "1", "ios": "8", "samsung": "5", + "rhino": "1.7.13", "electron": "0.31" }, "es7.array.flat-map": { @@ -75,6 +86,7 @@ "firefox": "62", "safari": "12", "node": "11", + "deno": "1", "ios": "12", "samsung": "10", "electron": "4.0" @@ -85,12 +97,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.from": { @@ -100,6 +114,7 @@ "firefox": "36", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -108,9 +123,10 @@ "chrome": "47", "opera": "34", "edge": "14", - "firefox": "43", + "firefox": "102", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -121,12 +137,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.is-array": { @@ -135,12 +153,14 @@ "edge": "12", "firefox": "4", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.iterator": { @@ -150,8 +170,10 @@ "firefox": "60", "safari": "9", "node": "10", + "deno": "1", "ios": "9", "samsung": "9", + "rhino": "1.7.13", "electron": "3.0" }, "es6.array.last-index-of": { @@ -160,12 +182,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.map": { @@ -175,6 +199,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -186,8 +211,10 @@ "firefox": "25", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "5", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.reduce": { @@ -196,12 +223,14 @@ "edge": "12", "firefox": "3", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.reduce-right": { @@ -210,12 +239,14 @@ "edge": "12", "firefox": "3", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.slice": { @@ -225,6 +256,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -235,12 +267,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.sort": { @@ -250,9 +284,11 @@ "firefox": "5", "safari": "12", "node": "10", + "deno": "1", "ie": "9", "ios": "12", "samsung": "8", + "rhino": "1.7.13", "electron": "3.0" }, "es6.array.species": { @@ -262,6 +298,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -272,12 +309,14 @@ "edge": "12", "firefox": "2", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-iso-string": { @@ -286,12 +325,14 @@ "edge": "12", "firefox": "3.5", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-json": { @@ -300,11 +341,13 @@ "edge": "12", "firefox": "4", "safari": "10", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "10", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-primitive": { @@ -314,6 +357,7 @@ "firefox": "44", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -324,12 +368,14 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "10", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.function.bind": { @@ -338,12 +384,14 @@ "edge": "12", "firefox": "4", "safari": "5.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.function.has-instance": { @@ -353,6 +401,7 @@ "firefox": "50", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -363,11 +412,13 @@ "edge": "14", "firefox": "2", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.map": { @@ -377,6 +428,7 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -388,8 +440,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.asinh": { @@ -399,8 +453,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.atanh": { @@ -410,8 +466,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.cbrt": { @@ -421,8 +479,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.clz32": { @@ -432,8 +492,10 @@ "firefox": "31", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.cosh": { @@ -443,8 +505,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.expm1": { @@ -454,8 +518,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.fround": { @@ -465,8 +531,10 @@ "firefox": "26", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.hypot": { @@ -476,8 +544,10 @@ "firefox": "27", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.imul": { @@ -487,9 +557,11 @@ "firefox": "23", "safari": "7", "node": "0.12", + "deno": "1", "android": "4.4", "ios": "7", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log1p": { @@ -499,8 +571,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log10": { @@ -510,8 +584,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log2": { @@ -521,8 +597,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.sign": { @@ -532,8 +610,10 @@ "firefox": "25", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.sinh": { @@ -543,8 +623,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.tanh": { @@ -554,8 +636,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.trunc": { @@ -565,8 +649,10 @@ "firefox": "25", "safari": "7.1", "node": "0.12", + "deno": "1", "ios": "8", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.constructor": { @@ -576,8 +662,10 @@ "firefox": "36", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.number.epsilon": { @@ -587,8 +675,10 @@ "firefox": "25", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.14", "electron": "0.20" }, "es6.number.is-finite": { @@ -597,10 +687,12 @@ "edge": "12", "firefox": "16", "safari": "9", - "node": "0.12", + "node": "0.8", + "deno": "1", "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-integer": { @@ -610,8 +702,10 @@ "firefox": "16", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-nan": { @@ -620,10 +714,12 @@ "edge": "12", "firefox": "15", "safari": "9", - "node": "0.12", + "node": "0.8", + "deno": "1", "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-safe-integer": { @@ -633,8 +729,10 @@ "firefox": "32", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.max-safe-integer": { @@ -644,8 +742,10 @@ "firefox": "31", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.min-safe-integer": { @@ -655,8 +755,10 @@ "firefox": "31", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.parse-float": { @@ -666,8 +768,10 @@ "firefox": "25", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.14", "electron": "0.20" }, "es6.number.parse-int": { @@ -677,8 +781,10 @@ "firefox": "25", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "2", + "rhino": "1.7.14", "electron": "0.20" }, "es6.object.assign": { @@ -688,6 +794,7 @@ "firefox": "36", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -698,12 +805,14 @@ "edge": "12", "firefox": "4", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.define-getter": { @@ -713,6 +822,7 @@ "firefox": "48", "safari": "9", "node": "8.10", + "deno": "1", "ios": "9", "samsung": "8", "electron": "3.0" @@ -724,6 +834,7 @@ "firefox": "48", "safari": "9", "node": "8.10", + "deno": "1", "ios": "9", "samsung": "8", "electron": "3.0" @@ -734,12 +845,14 @@ "edge": "12", "firefox": "4", "safari": "5.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.object.define-properties": { @@ -748,12 +861,14 @@ "edge": "12", "firefox": "4", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.entries": { @@ -763,8 +878,10 @@ "firefox": "47", "safari": "10.1", "node": "7", + "deno": "1", "ios": "10.3", "samsung": "6", + "rhino": "1.7.14", "electron": "1.4" }, "es6.object.freeze": { @@ -774,8 +891,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.get-own-property-descriptor": { @@ -785,8 +904,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es7.object.get-own-property-descriptors": { @@ -796,6 +917,7 @@ "firefox": "50", "safari": "10.1", "node": "7", + "deno": "1", "ios": "10.3", "samsung": "6", "electron": "1.4" @@ -807,8 +929,10 @@ "firefox": "33", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.object.get-prototype-of": { @@ -818,8 +942,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es7.object.lookup-getter": { @@ -829,6 +955,7 @@ "firefox": "36", "safari": "9", "node": "8.10", + "deno": "1", "ios": "9", "samsung": "8", "electron": "3.0" @@ -840,6 +967,7 @@ "firefox": "36", "safari": "9", "node": "8.10", + "deno": "1", "ios": "9", "samsung": "8", "electron": "3.0" @@ -851,8 +979,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.to-string": { @@ -862,6 +992,7 @@ "firefox": "51", "safari": "10", "node": "8", + "deno": "1", "ios": "10", "samsung": "7", "electron": "1.7" @@ -872,10 +1003,12 @@ "edge": "12", "firefox": "22", "safari": "9", - "node": "0.12", + "node": "0.8", + "deno": "1", "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7.13", "electron": "0.20" }, "es6.object.is-frozen": { @@ -885,8 +1018,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.is-sealed": { @@ -896,8 +1031,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.is-extensible": { @@ -907,8 +1044,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.keys": { @@ -918,8 +1057,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.object.seal": { @@ -929,8 +1070,10 @@ "firefox": "35", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.set-prototype-of": { @@ -940,9 +1083,11 @@ "firefox": "31", "safari": "9", "node": "0.12", + "deno": "1", "ie": "11", "ios": "9", "samsung": "2", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.values": { @@ -952,8 +1097,10 @@ "firefox": "47", "safari": "10.1", "node": "7", + "deno": "1", "ios": "10.3", "samsung": "6", + "rhino": "1.7.14", "electron": "1.4" }, "es6.promise": { @@ -963,6 +1110,7 @@ "firefox": "45", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -974,6 +1122,7 @@ "firefox": "58", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "8", "electron": "3.0" @@ -985,6 +1134,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -996,6 +1146,7 @@ "firefox": "49", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1007,6 +1158,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1018,6 +1170,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1029,6 +1182,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1040,6 +1194,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1051,6 +1206,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1062,6 +1218,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1073,6 +1230,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1084,6 +1242,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1095,6 +1254,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1106,6 +1266,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1117,6 +1278,7 @@ "firefox": "42", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -1128,6 +1290,7 @@ "firefox": "40", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.1" @@ -1139,6 +1302,7 @@ "firefox": "37", "safari": "9", "node": "6", + "deno": "1", "ios": "9", "samsung": "5", "electron": "0.37" @@ -1150,8 +1314,10 @@ "firefox": "49", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", + "rhino": "1.7.13", "electron": "1.1" }, "es6.regexp.replace": { @@ -1161,6 +1327,7 @@ "firefox": "49", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.1" @@ -1172,6 +1339,7 @@ "firefox": "49", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.1" @@ -1183,8 +1351,10 @@ "firefox": "49", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", + "rhino": "1.7.13", "electron": "1.1" }, "es6.regexp.to-string": { @@ -1194,6 +1364,7 @@ "firefox": "39", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.1" @@ -1205,6 +1376,7 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1216,6 +1388,7 @@ "firefox": "51", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1227,6 +1400,7 @@ "firefox": "57", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "8", "electron": "3.0" @@ -1237,11 +1411,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.big": { @@ -1250,11 +1426,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.blink": { @@ -1263,11 +1441,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.bold": { @@ -1276,11 +1456,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.code-point-at": { @@ -1290,8 +1472,10 @@ "firefox": "29", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.ends-with": { @@ -1301,8 +1485,10 @@ "firefox": "29", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.fixed": { @@ -1311,11 +1497,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.fontcolor": { @@ -1324,11 +1512,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.fontsize": { @@ -1337,11 +1527,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.from-code-point": { @@ -1351,8 +1543,10 @@ "firefox": "29", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.includes": { @@ -1362,8 +1556,10 @@ "firefox": "40", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.italics": { @@ -1372,11 +1568,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.iterator": { @@ -1386,8 +1584,10 @@ "firefox": "36", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "es6.string.link": { @@ -1396,11 +1596,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es7.string.pad-start": { @@ -1410,8 +1612,10 @@ "firefox": "48", "safari": "10", "node": "8", + "deno": "1", "ios": "10", "samsung": "7", + "rhino": "1.7.13", "electron": "1.7" }, "es7.string.pad-end": { @@ -1421,8 +1625,10 @@ "firefox": "48", "safari": "10", "node": "8", + "deno": "1", "ios": "10", "samsung": "7", + "rhino": "1.7.13", "electron": "1.7" }, "es6.string.raw": { @@ -1432,8 +1638,10 @@ "firefox": "34", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.14", "electron": "0.21" }, "es6.string.repeat": { @@ -1443,8 +1651,10 @@ "firefox": "24", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.small": { @@ -1453,11 +1663,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.starts-with": { @@ -1467,8 +1679,10 @@ "firefox": "29", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.strike": { @@ -1477,11 +1691,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.sub": { @@ -1490,11 +1706,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.sup": { @@ -1503,11 +1721,13 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.10", + "node": "0.4", + "deno": "1", "android": "4", "ios": "7", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.14", "electron": "0.20" }, "es6.string.trim": { @@ -1516,12 +1736,14 @@ "edge": "12", "firefox": "3.5", "safari": "4", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es7.string.trim-left": { @@ -1531,8 +1753,10 @@ "firefox": "61", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "9", + "rhino": "1.7.13", "electron": "3.0" }, "es7.string.trim-right": { @@ -1542,8 +1766,10 @@ "firefox": "61", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "9", + "rhino": "1.7.13", "electron": "3.0" }, "es6.typed.array-buffer": { @@ -1553,6 +1779,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1563,12 +1790,14 @@ "edge": "12", "firefox": "15", "safari": "5.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "10", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "es6.typed.int8-array": { @@ -1578,6 +1807,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1589,6 +1819,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1600,6 +1831,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1611,6 +1843,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1622,6 +1855,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1633,6 +1867,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1644,6 +1879,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1655,6 +1891,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1666,6 +1903,7 @@ "firefox": "48", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -1677,6 +1915,7 @@ "firefox": "53", "safari": "9", "node": "6.5", + "deno": "1", "ios": "9", "samsung": "5", "electron": "1.2" @@ -1688,6 +1927,7 @@ "firefox": "53", "safari": "9", "node": "6.5", + "deno": "1", "ios": "9", "samsung": "5", "electron": "1.2" diff --git a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json index 7ce01ed9..d03b698f 100644 --- a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json +++ b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json @@ -1,5 +1,5 @@ [ - "esnext.global-this", "esnext.promise.all-settled", - "esnext.string.match-all" + "esnext.string.match-all", + "esnext.global-this" ] diff --git a/node_modules/@babel/compat-data/data/overlapping-plugins.json b/node_modules/@babel/compat-data/data/overlapping-plugins.json index 51976d9e..94fda05d 100644 --- a/node_modules/@babel/compat-data/data/overlapping-plugins.json +++ b/node_modules/@babel/compat-data/data/overlapping-plugins.json @@ -3,7 +3,8 @@ "bugfix/transform-async-arrows-in-class" ], "transform-parameters": [ - "bugfix/transform-edge-default-parameters" + "bugfix/transform-edge-default-parameters", + "bugfix/transform-safari-id-destructuring-collision-in-function-expression" ], "transform-function-name": [ "bugfix/transform-edge-function-name" @@ -15,6 +16,9 @@ "transform-template-literals": [ "bugfix/transform-tagged-template-caching" ], + "transform-optional-chaining": [ + "bugfix/transform-v8-spread-parameters-in-optional-chaining" + ], "proposal-optional-chaining": [ "bugfix/transform-v8-spread-parameters-in-optional-chaining" ] diff --git a/node_modules/@babel/compat-data/data/plugin-bugfixes.json b/node_modules/@babel/compat-data/data/plugin-bugfixes.json index b1521be3..8befd323 100644 --- a/node_modules/@babel/compat-data/data/plugin-bugfixes.json +++ b/node_modules/@babel/compat-data/data/plugin-bugfixes.json @@ -1,15 +1,4 @@ { - "transform-async-to-generator": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "10.1", - "node": "7.6", - "ios": "10.3", - "samsung": "6", - "electron": "1.6" - }, "bugfix/transform-async-arrows-in-class": { "chrome": "55", "opera": "42", @@ -17,21 +6,11 @@ "firefox": "52", "safari": "11", "node": "7.6", + "deno": "1", "ios": "11", "samsung": "6", "electron": "1.6" }, - "transform-parameters": { - "chrome": "49", - "opera": "36", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, "bugfix/transform-edge-default-parameters": { "chrome": "49", "opera": "36", @@ -39,21 +18,11 @@ "firefox": "52", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" }, - "transform-function-name": { - "chrome": "51", - "opera": "38", - "edge": "14", - "firefox": "53", - "safari": "10", - "node": "6.5", - "ios": "10", - "samsung": "5", - "electron": "1.2" - }, "bugfix/transform-edge-function-name": { "chrome": "51", "opera": "38", @@ -61,21 +30,11 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" }, - "transform-block-scoping": { - "chrome": "49", - "opera": "36", - "edge": "14", - "firefox": "51", - "safari": "10", - "node": "6", - "ios": "10", - "samsung": "5", - "electron": "0.37" - }, "bugfix/transform-safari-block-shadowing": { "chrome": "49", "opera": "36", @@ -83,6 +42,7 @@ "firefox": "44", "safari": "11", "node": "6", + "deno": "1", "ie": "11", "ios": "11", "samsung": "5", @@ -95,21 +55,22 @@ "firefox": "4", "safari": "11", "node": "6", + "deno": "1", "ie": "11", "ios": "11", "samsung": "5", + "rhino": "1.7.13", "electron": "0.37" }, - "transform-template-literals": { - "chrome": "41", - "opera": "28", - "edge": "13", - "firefox": "34", - "safari": "9", - "node": "4", - "ios": "9", - "samsung": "3.4", - "electron": "0.21" + "bugfix/transform-safari-id-destructuring-collision-in-function-expression": { + "chrome": "49", + "opera": "36", + "edge": "14", + "firefox": "2", + "node": "6", + "deno": "1", + "samsung": "5", + "electron": "0.37" }, "bugfix/transform-tagged-template-caching": { "chrome": "41", @@ -118,24 +79,106 @@ "firefox": "34", "safari": "13", "node": "4", + "deno": "1", "ios": "13", "samsung": "3.4", + "rhino": "1.7.14", "electron": "0.21" }, - "proposal-optional-chaining": { + "bugfix/transform-v8-spread-parameters-in-optional-chaining": { + "chrome": "91", + "opera": "77", + "edge": "91", + "firefox": "74", + "safari": "13.1", + "node": "16.9", + "deno": "1.9", + "ios": "13.4", + "samsung": "16", + "electron": "13.0" + }, + "transform-optional-chaining": { "chrome": "80", "opera": "67", "edge": "80", "firefox": "74", "safari": "13.1", "node": "14", + "deno": "1", "ios": "13.4", "samsung": "13", "electron": "8.0" }, - "bugfix/transform-v8-spread-parameters-in-optional-chaining": { + "proposal-optional-chaining": { + "chrome": "80", + "opera": "67", + "edge": "80", "firefox": "74", "safari": "13.1", - "ios": "13.4" + "node": "14", + "deno": "1", + "ios": "13.4", + "samsung": "13", + "electron": "8.0" + }, + "transform-parameters": { + "chrome": "49", + "opera": "36", + "edge": "15", + "firefox": "53", + "safari": "10", + "node": "6", + "deno": "1", + "ios": "10", + "samsung": "5", + "electron": "0.37" + }, + "transform-async-to-generator": { + "chrome": "55", + "opera": "42", + "edge": "15", + "firefox": "52", + "safari": "10.1", + "node": "7.6", + "deno": "1", + "ios": "10.3", + "samsung": "6", + "electron": "1.6" + }, + "transform-template-literals": { + "chrome": "41", + "opera": "28", + "edge": "13", + "firefox": "34", + "safari": "9", + "node": "4", + "deno": "1", + "ios": "9", + "samsung": "3.4", + "electron": "0.21" + }, + "transform-function-name": { + "chrome": "51", + "opera": "38", + "edge": "14", + "firefox": "53", + "safari": "10", + "node": "6.5", + "deno": "1", + "ios": "10", + "samsung": "5", + "electron": "1.2" + }, + "transform-block-scoping": { + "chrome": "50", + "opera": "37", + "edge": "14", + "firefox": "53", + "safari": "10", + "node": "6", + "deno": "1", + "ios": "10", + "samsung": "5", + "electron": "1.1" } } diff --git a/node_modules/@babel/compat-data/data/plugins.json b/node_modules/@babel/compat-data/data/plugins.json index 4c6bca47..2e6df5ba 100644 --- a/node_modules/@babel/compat-data/data/plugins.json +++ b/node_modules/@babel/compat-data/data/plugins.json @@ -1,20 +1,114 @@ { + "transform-unicode-sets-regex": { + "chrome": "112", + "opera": "98", + "edge": "112" + }, + "transform-class-static-block": { + "chrome": "94", + "opera": "80", + "edge": "94", + "firefox": "93", + "node": "16.11", + "deno": "1.14", + "samsung": "17", + "electron": "15.0" + }, + "proposal-class-static-block": { + "chrome": "94", + "opera": "80", + "edge": "94", + "firefox": "93", + "node": "16.11", + "deno": "1.14", + "samsung": "17", + "electron": "15.0" + }, + "transform-private-property-in-object": { + "chrome": "91", + "opera": "77", + "edge": "91", + "firefox": "90", + "safari": "15", + "node": "16.9", + "deno": "1.9", + "ios": "15", + "samsung": "16", + "electron": "13.0" + }, + "proposal-private-property-in-object": { + "chrome": "91", + "opera": "77", + "edge": "91", + "firefox": "90", + "safari": "15", + "node": "16.9", + "deno": "1.9", + "ios": "15", + "samsung": "16", + "electron": "13.0" + }, + "transform-class-properties": { + "chrome": "74", + "opera": "62", + "edge": "79", + "firefox": "90", + "safari": "14.1", + "node": "12", + "deno": "1", + "ios": "15", + "samsung": "11", + "electron": "6.0" + }, "proposal-class-properties": { "chrome": "74", "opera": "62", "edge": "79", + "firefox": "90", "safari": "14.1", "node": "12", + "deno": "1", + "ios": "15", "samsung": "11", "electron": "6.0" }, + "transform-private-methods": { + "chrome": "84", + "opera": "70", + "edge": "84", + "firefox": "90", + "safari": "15", + "node": "14.6", + "deno": "1", + "ios": "15", + "samsung": "14", + "electron": "10.0" + }, "proposal-private-methods": { "chrome": "84", "opera": "70", "edge": "84", + "firefox": "90", + "safari": "15", "node": "14.6", + "deno": "1", + "ios": "15", + "samsung": "14", "electron": "10.0" }, + "transform-numeric-separator": { + "chrome": "75", + "opera": "62", + "edge": "79", + "firefox": "70", + "safari": "13", + "node": "12.5", + "deno": "1", + "ios": "13", + "samsung": "11", + "rhino": "1.7.14", + "electron": "6.0" + }, "proposal-numeric-separator": { "chrome": "75", "opera": "62", @@ -22,19 +116,48 @@ "firefox": "70", "safari": "13", "node": "12.5", + "deno": "1", "ios": "13", "samsung": "11", + "rhino": "1.7.14", "electron": "6.0" }, + "transform-logical-assignment-operators": { + "chrome": "85", + "opera": "71", + "edge": "85", + "firefox": "79", + "safari": "14", + "node": "15", + "deno": "1.2", + "ios": "14", + "samsung": "14", + "electron": "10.0" + }, "proposal-logical-assignment-operators": { "chrome": "85", + "opera": "71", "edge": "85", "firefox": "79", "safari": "14", "node": "15", + "deno": "1.2", "ios": "14", + "samsung": "14", "electron": "10.0" }, + "transform-nullish-coalescing-operator": { + "chrome": "80", + "opera": "67", + "edge": "80", + "firefox": "72", + "safari": "13.1", + "node": "14", + "deno": "1", + "ios": "13.4", + "samsung": "13", + "electron": "8.0" + }, "proposal-nullish-coalescing-operator": { "chrome": "80", "opera": "67", @@ -42,14 +165,47 @@ "firefox": "72", "safari": "13.1", "node": "14", + "deno": "1", "ios": "13.4", "samsung": "13", "electron": "8.0" }, + "transform-optional-chaining": { + "chrome": "91", + "opera": "77", + "edge": "91", + "firefox": "74", + "safari": "13.1", + "node": "16.9", + "deno": "1.9", + "ios": "13.4", + "samsung": "16", + "electron": "13.0" + }, "proposal-optional-chaining": { + "chrome": "91", + "opera": "77", + "edge": "91", "firefox": "74", "safari": "13.1", - "ios": "13.4" + "node": "16.9", + "deno": "1.9", + "ios": "13.4", + "samsung": "16", + "electron": "13.0" + }, + "transform-json-strings": { + "chrome": "66", + "opera": "53", + "edge": "79", + "firefox": "62", + "safari": "12", + "node": "10", + "deno": "1", + "ios": "12", + "samsung": "9", + "rhino": "1.7.14", + "electron": "3.0" }, "proposal-json-strings": { "chrome": "66", @@ -58,8 +214,22 @@ "firefox": "62", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "9", + "rhino": "1.7.14", + "electron": "3.0" + }, + "transform-optional-catch-binding": { + "chrome": "66", + "opera": "53", + "edge": "79", + "firefox": "58", + "safari": "11.1", + "node": "10", + "deno": "1", + "ios": "11.3", + "samsung": "9", "electron": "3.0" }, "proposal-optional-catch-binding": { @@ -69,6 +239,7 @@ "firefox": "58", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "9", "electron": "3.0" @@ -78,12 +249,23 @@ "opera": "36", "edge": "18", "firefox": "53", - "safari": "10", "node": "6", - "ios": "10", + "deno": "1", "samsung": "5", "electron": "0.37" }, + "transform-async-generator-functions": { + "chrome": "63", + "opera": "50", + "edge": "79", + "firefox": "57", + "safari": "12", + "node": "10", + "deno": "1", + "ios": "12", + "samsung": "8", + "electron": "3.0" + }, "proposal-async-generator-functions": { "chrome": "63", "opera": "50", @@ -91,10 +273,23 @@ "firefox": "57", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "8", "electron": "3.0" }, + "transform-object-rest-spread": { + "chrome": "60", + "opera": "47", + "edge": "79", + "firefox": "55", + "safari": "11.1", + "node": "8.3", + "deno": "1", + "ios": "11.3", + "samsung": "8", + "electron": "2.0" + }, "proposal-object-rest-spread": { "chrome": "60", "opera": "47", @@ -102,6 +297,7 @@ "firefox": "55", "safari": "11.1", "node": "8.3", + "deno": "1", "ios": "11.3", "samsung": "8", "electron": "2.0" @@ -113,10 +309,23 @@ "firefox": "78", "safari": "11.1", "node": "8.10", + "deno": "1", "ios": "11.3", "samsung": "8", "electron": "3.0" }, + "transform-unicode-property-regex": { + "chrome": "64", + "opera": "51", + "edge": "79", + "firefox": "78", + "safari": "11.1", + "node": "10", + "deno": "1", + "ios": "11.3", + "samsung": "9", + "electron": "3.0" + }, "proposal-unicode-property-regex": { "chrome": "64", "opera": "51", @@ -124,6 +333,7 @@ "firefox": "78", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "9", "electron": "3.0" @@ -135,6 +345,7 @@ "firefox": "78", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "9", "electron": "3.0" @@ -146,6 +357,7 @@ "firefox": "52", "safari": "11", "node": "7.6", + "deno": "1", "ios": "11", "samsung": "6", "electron": "1.6" @@ -157,8 +369,10 @@ "firefox": "52", "safari": "10.1", "node": "7", + "deno": "1", "ios": "10.3", "samsung": "6", + "rhino": "1.7.14", "electron": "1.3" }, "transform-template-literals": { @@ -168,6 +382,7 @@ "firefox": "34", "safari": "13", "node": "4", + "deno": "1", "ios": "13", "samsung": "3.4", "electron": "0.21" @@ -179,6 +394,7 @@ "firefox": "53", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", "electron": "0.30" @@ -190,6 +406,7 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -198,11 +415,13 @@ "chrome": "47", "opera": "34", "edge": "13", - "firefox": "45", + "firefox": "43", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", + "rhino": "1.7.13", "electron": "0.36" }, "transform-block-scoped-functions": { @@ -212,6 +431,7 @@ "firefox": "46", "safari": "10", "node": "4", + "deno": "1", "ie": "11", "ios": "10", "samsung": "3.4", @@ -224,6 +444,7 @@ "firefox": "45", "safari": "10", "node": "5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -235,6 +456,7 @@ "firefox": "45", "safari": "10", "node": "5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -246,8 +468,10 @@ "firefox": "33", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", + "rhino": "1.7.14", "electron": "0.27" }, "transform-duplicate-keys": { @@ -257,6 +481,7 @@ "firefox": "34", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "3.4", "electron": "0.25" @@ -268,6 +493,7 @@ "firefox": "34", "safari": "7.1", "node": "4", + "deno": "1", "ios": "8", "samsung": "4", "electron": "0.30" @@ -279,6 +505,7 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" @@ -290,6 +517,7 @@ "firefox": "3", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.37" @@ -301,6 +529,7 @@ "firefox": "53", "safari": "9", "node": "4", + "deno": "1", "ios": "9", "samsung": "4", "electron": "0.30" @@ -312,6 +541,7 @@ "firefox": "46", "safari": "12", "node": "6", + "deno": "1", "ios": "12", "samsung": "5", "electron": "1.1" @@ -320,9 +550,10 @@ "chrome": "46", "opera": "33", "edge": "13", - "firefox": "36", + "firefox": "45", "safari": "10", "node": "5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -334,20 +565,22 @@ "firefox": "53", "safari": "10", "node": "6.5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.2" }, "transform-block-scoping": { - "chrome": "49", - "opera": "36", + "chrome": "50", + "opera": "37", "edge": "14", - "firefox": "51", + "firefox": "53", "safari": "11", "node": "6", + "deno": "1", "ios": "11", "samsung": "5", - "electron": "0.37" + "electron": "1.1" }, "transform-typeof-symbol": { "chrome": "38", @@ -356,8 +589,10 @@ "firefox": "36", "safari": "9", "node": "0.12", + "deno": "1", "ios": "9", "samsung": "3", + "rhino": "1.7.13", "electron": "0.20" }, "transform-new-target": { @@ -367,6 +602,7 @@ "firefox": "41", "safari": "10", "node": "5", + "deno": "1", "ios": "10", "samsung": "5", "electron": "0.36" @@ -378,6 +614,7 @@ "firefox": "53", "safari": "10", "node": "6", + "deno": "1", "ios": "10", "samsung": "5", "electron": "1.1" @@ -388,12 +625,14 @@ "edge": "12", "firefox": "2", "safari": "5.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "transform-property-literals": { @@ -402,12 +641,14 @@ "edge": "12", "firefox": "2", "safari": "5.1", - "node": "0.10", + "node": "0.4", + "deno": "1", "ie": "9", "android": "4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, "transform-reserved-words": { @@ -416,14 +657,29 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.10", + "node": "0.6", + "deno": "1", "ie": "9", "android": "4.4", "ios": "6", - "phantom": "2", + "phantom": "1.9", "samsung": "1", + "rhino": "1.7.13", "electron": "0.20" }, + "transform-export-namespace-from": { + "chrome": "72", + "and_chr": "72", + "edge": "79", + "firefox": "80", + "and_ff": "80", + "node": "13.2", + "opera": "60", + "op_mob": "51", + "samsung": "11.0", + "android": "72", + "electron": "5.0" + }, "proposal-export-namespace-from": { "chrome": "72", "and_chr": "72", diff --git a/node_modules/@babel/compat-data/package.json b/node_modules/@babel/compat-data/package.json index 188cae50..d69980d0 100644 --- a/node_modules/@babel/compat-data/package.json +++ b/node_modules/@babel/compat-data/package.json @@ -1,42 +1,16 @@ { - "_from": "@babel/compat-data@^7.13.12", - "_id": "@babel/compat-data@7.13.12", - "_inBundle": false, - "_integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", - "_location": "/@babel/compat-data", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/compat-data@^7.13.12", - "name": "@babel/compat-data", - "escapedName": "@babel%2fcompat-data", - "scope": "@babel", - "rawSpec": "^7.13.12", - "saveSpec": null, - "fetchSpec": "^7.13.12" - }, - "_requiredBy": [ - "/@babel/helper-compilation-targets" - ], - "_resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "_shasum": "a8a5ccac19c200f9dd49624cac6e19d7be1236a1", - "_spec": "@babel/compat-data@^7.13.12", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/helper-compilation-targets", - "author": { - "name": "The Babel Team", - "url": "https://babel.dev/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "deprecated": false, + "name": "@babel/compat-data", + "version": "7.22.3", + "author": "The Babel Team (https://babel.dev/team)", + "license": "MIT", "description": "", - "devDependencies": { - "@mdn/browser-compat-data": "^3.1.1", - "core-js-compat": "^3.9.0", - "electron-to-chromium": "1.3.672" + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-compat-data" + }, + "publishConfig": { + "access": "public" }, "exports": { "./plugins": "./plugins.js", @@ -46,24 +20,21 @@ "./overlapping-plugins": "./overlapping-plugins.js", "./plugin-bugfixes": "./plugin-bugfixes.js" }, - "homepage": "https://github.com/babel/babel#readme", + "scripts": { + "build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.js && node ./scripts/build-modules-support.js && node ./scripts/build-bugfixes-targets.js" + }, "keywords": [ "babel", "compat-table", "compat-data" ], - "license": "MIT", - "name": "@babel/compat-data", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-compat-data" + "devDependencies": { + "@mdn/browser-compat-data": "^4.0.10", + "core-js-compat": "^3.30.2", + "electron-to-chromium": "^1.4.248" }, - "scripts": { - "build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.js && node ./scripts/build-modules-support.js && node ./scripts/build-bugfixes-targets.js" + "engines": { + "node": ">=6.9.0" }, - "version": "7.13.12" -} + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/core/cjs-proxy.cjs b/node_modules/@babel/core/cjs-proxy.cjs new file mode 100644 index 00000000..a53f616d --- /dev/null +++ b/node_modules/@babel/core/cjs-proxy.cjs @@ -0,0 +1,51 @@ +"use strict"; + +const babelP = import("./lib/index.js"); +let babel = null; +Object.defineProperty(exports, "__ initialize @babel/core cjs proxy __", { + set(val) { + babel = val; + }, +}); + +const functionNames = [ + "createConfigItem", + "loadPartialConfig", + "loadOptions", + "transform", + "transformFile", + "transformFromAst", + "parse", +]; +const propertyNames = ["types", "tokTypes", "traverse", "template", "version"]; + +for (const name of functionNames) { + exports[name] = function (...args) { + babelP.then(babel => { + babel[name](...args); + }); + }; + exports[`${name}Async`] = function (...args) { + return babelP.then(babel => babel[`${name}Async`](...args)); + }; + exports[`${name}Sync`] = function (...args) { + if (!babel) throw notLoadedError(`${name}Sync`, "callable"); + return babel[`${name}Sync`](...args); + }; +} + +for (const name of propertyNames) { + Object.defineProperty(exports, name, { + get() { + if (!babel) throw notLoadedError(name, "accessible"); + return babel[name]; + }, + }); +} + +function notLoadedError(name, keyword) { + return new Error( + `The \`${name}\` export of @babel/core is only ${keyword}` + + ` from the CommonJS version after that the ESM version is loaded.` + ); +} diff --git a/node_modules/@babel/core/lib/config/cache-contexts.js b/node_modules/@babel/core/lib/config/cache-contexts.js index e69de29b..d7c09127 100644 --- a/node_modules/@babel/core/lib/config/cache-contexts.js +++ b/node_modules/@babel/core/lib/config/cache-contexts.js @@ -0,0 +1,3 @@ +0 && 0; + +//# sourceMappingURL=cache-contexts.js.map diff --git a/node_modules/@babel/core/lib/config/cache-contexts.js.map b/node_modules/@babel/core/lib/config/cache-contexts.js.map new file mode 100644 index 00000000..37fb689e --- /dev/null +++ b/node_modules/@babel/core/lib/config/cache-contexts.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigContext } from \"./config-chain\";\nimport type { CallerMetadata } from \"./validation/options\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: Targets;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: { [name: string]: boolean };\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: Targets;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: {\n [name: string]: boolean;\n };\n} & SimplePreset;\n"],"mappings":""} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js index 97f6a0d2..fac046bd 100644 --- a/node_modules/@babel/core/lib/config/caching.js +++ b/node_modules/@babel/core/lib/config/caching.js @@ -3,42 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.makeWeakCache = makeWeakCache; -exports.makeWeakCacheSync = makeWeakCacheSync; +exports.assertSimpleType = assertSimpleType; exports.makeStrongCache = makeStrongCache; exports.makeStrongCacheSync = makeStrongCacheSync; -exports.assertSimpleType = assertSimpleType; - +exports.makeWeakCache = makeWeakCache; +exports.makeWeakCacheSync = makeWeakCacheSync; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} var _async = require("../gensync-utils/async"); - var _util = require("./util"); - -const gensync = require("gensync"); - const synchronize = gen => { - return gensync(gen).sync; + return _gensync()(gen).sync; }; - -function* genTrue(data) { +function* genTrue() { return true; } - function makeWeakCache(handler) { return makeCachedFunction(WeakMap, handler); } - function makeWeakCacheSync(handler) { return synchronize(makeWeakCache(handler)); } - function makeStrongCache(handler) { return makeCachedFunction(Map, handler); } - function makeStrongCacheSync(handler) { return synchronize(makeStrongCache(handler)); } - function makeCachedFunction(CallCache, handler) { const callCacheSync = new CallCache(); const callCacheAsync = new CallCache(); @@ -52,30 +48,23 @@ function makeCachedFunction(CallCache, handler) { const handlerResult = handler(arg, cache); let finishLock; let value; - if ((0, _util.isIterableIterator)(handlerResult)) { - const gen = handlerResult; - value = yield* (0, _async.onFirstPause)(gen, () => { + value = yield* (0, _async.onFirstPause)(handlerResult, () => { finishLock = setupAsyncLocks(cache, futureCache, arg); }); } else { value = handlerResult; } - updateFunctionCache(callCache, cache, arg, value); - if (finishLock) { futureCache.delete(arg); finishLock.release(value); } - return value; }; } - function* getCachedValue(cache, arg, data) { const cachedValue = cache.get(arg); - if (cachedValue) { for (const { value, @@ -87,23 +76,18 @@ function* getCachedValue(cache, arg, data) { }; } } - return { valid: false, value: null }; } - function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) { const cached = yield* getCachedValue(callCache, arg, data); - if (cached.valid) { return cached; } - if (asyncContext) { const cached = yield* getCachedValue(futureCache, arg, data); - if (cached.valid) { const value = yield* (0, _async.waitFor)(cached.value.promise); return { @@ -112,24 +96,20 @@ function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) }; } } - return { valid: false, value: null }; } - function setupAsyncLocks(config, futureCache, arg) { const finishLock = new Lock(); updateFunctionCache(futureCache, config, arg, finishLock); return finishLock; } - function updateFunctionCache(cache, config, arg, value) { if (!config.configured()) config.forever(); let cachedValue = cache.get(arg); config.deactivate(); - switch (config.mode()) { case "forever": cachedValue = [{ @@ -138,7 +118,6 @@ function updateFunctionCache(cache, config, arg, value) { }]; cache.set(arg, cachedValue); break; - case "invalidate": cachedValue = [{ value, @@ -146,7 +125,6 @@ function updateFunctionCache(cache, config, arg, value) { }]; cache.set(arg, cachedValue); break; - case "valid": if (cachedValue) { cachedValue.push({ @@ -160,10 +138,8 @@ function updateFunctionCache(cache, config, arg, value) { }]; cache.set(arg, cachedValue); } - } } - class CacheConfigurator { constructor(data) { this._active = true; @@ -175,129 +151,97 @@ class CacheConfigurator { this._data = void 0; this._data = data; } - simple() { return makeSimpleConfigurator(this); } - mode() { if (this._never) return "never"; if (this._forever) return "forever"; if (this._invalidate) return "invalidate"; return "valid"; } - forever() { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } - if (this._never) { throw new Error("Caching has already been configured with .never()"); } - this._forever = true; this._configured = true; } - never() { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } - if (this._forever) { throw new Error("Caching has already been configured with .forever()"); } - this._never = true; this._configured = true; } - using(handler) { if (!this._active) { throw new Error("Cannot change caching after evaluation has completed."); } - if (this._never || this._forever) { throw new Error("Caching has already been configured with .never or .forever()"); } - this._configured = true; const key = handler(this._data); const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`); - if ((0, _async.isThenable)(key)) { return key.then(key => { this._pairs.push([key, fn]); - return key; }); } - this._pairs.push([key, fn]); - return key; } - invalidate(handler) { this._invalidate = true; return this.using(handler); } - validator() { const pairs = this._pairs; return function* (data) { for (const [key, fn] of pairs) { if (key !== (yield* fn(data))) return false; } - return true; }; } - deactivate() { this._active = false; } - configured() { return this._configured; } - } - function makeSimpleConfigurator(cache) { function cacheFn(val) { if (typeof val === "boolean") { if (val) cache.forever();else cache.never(); return; } - return cache.using(() => assertSimpleType(val())); } - cacheFn.forever = () => cache.forever(); - cacheFn.never = () => cache.never(); - cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); - cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); - return cacheFn; } - function assertSimpleType(value) { if ((0, _async.isThenable)(value)) { throw new Error(`You appear to be using an async cache handler, ` + `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 handle your caching logic.`); } - 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; } - class Lock { constructor() { this.released = false; @@ -307,11 +251,11 @@ class Lock { this._resolve = resolve; }); } - release(value) { this.released = true; - this._resolve(value); } +} +0 && 0; -} \ No newline at end of file +//# sourceMappingURL=caching.js.map diff --git a/node_modules/@babel/core/lib/config/caching.js.map b/node_modules/@babel/core/lib/config/caching.js.map new file mode 100644 index 00000000..ffdac2fe --- /dev/null +++ b/node_modules/@babel/core/lib/config/caching.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_async","_util","synchronize","gen","gensync","sync","genTrue","makeWeakCache","handler","makeCachedFunction","WeakMap","makeWeakCacheSync","makeStrongCache","Map","makeStrongCacheSync","CallCache","callCacheSync","callCacheAsync","futureCache","cachedFunction","arg","asyncContext","isAsync","callCache","cached","getCachedValueOrWait","valid","value","cache","CacheConfigurator","handlerResult","finishLock","isIterableIterator","onFirstPause","setupAsyncLocks","updateFunctionCache","delete","release","getCachedValue","cachedValue","get","waitFor","promise","config","Lock","configured","forever","deactivate","mode","set","validator","push","constructor","_active","_never","_forever","_invalidate","_configured","_pairs","_data","simple","makeSimpleConfigurator","Error","never","using","key","fn","maybeAsync","isThenable","then","invalidate","pairs","cacheFn","val","assertSimpleType","cb","released","_resolve","Promise","resolve"],"sources":["../../src/config/caching.ts"],"sourcesContent":["import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async\";\nimport { isIterableIterator } from \"./util\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = Array<{\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}>;\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: Array<\n [cachedValue: unknown, handler: (data: SideChannel) => Handler]\n > = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: { (): SimpleType }) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: { (): SimpleType }) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AAmBA,MAAMG,WAAW,GACfC,GAAyC,IACP;EAClC,OAAOC,SAAMA,CAAC,CAACD,GAAG,CAAC,CAACE,IAAI;AAC1B,CAAC;AAGD,UAAUC,OAAOA,CAAA,EAAG;EAClB,OAAO,IAAI;AACb;AAEO,SAASC,aAAaA,CAC3BC,OAG+B,EACqB;EACpD,OAAOC,kBAAkB,CAA6BC,OAAO,EAAEF,OAAO,CAAC;AACzE;AAEO,SAASG,iBAAiBA,CAC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zB;IACA,MAAM,IAAImC,KAAK,CACb,wEACF,CAAC;EACH;EAGA,OAAOnC,KAAK;AACd;AAEA,MAAMiB,IAAI,CAAI;EAKZQ,WAAWA,CAAA,EAAG;IAAA,KAJdwB,QAAQ,GAAY,KAAK;IAAA,KACzBlC,OAAO;IAAA,KACPmC,QAAQ;IAGN,IAAI,CAACnC,OAAO,GAAG,IAAIoC,OAAO,CAACC,OAAO,IAAI;MACpC,IAAI,CAACF,QAAQ,GAAGE,OAAO;IACzB,CAAC,CAAC;EACJ;EAEA1C,OAAOA,CAACV,KAAQ,EAAE;IAChB,IAAI,CAACiD,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,QAAQ,CAAClD,KAAK,CAAC;EACtB;AACF;AAAC"} \ 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 edf2f958..c54fdf5b 100644 --- a/node_modules/@babel/core/lib/config/config-chain.js +++ b/node_modules/@babel/core/lib/config/config-chain.js @@ -4,29 +4,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.buildPresetChain = buildPresetChain; -exports.buildRootChain = buildRootChain; exports.buildPresetChainWalker = void 0; - +exports.buildRootChain = buildRootChain; +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +function _debug() { + const data = require("debug"); + _debug = function () { + return data; + }; + return data; +} var _options = require("./validation/options"); - -var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex")); - +var _patternToRegex = require("./pattern-to-regex"); var _printer = require("./printer"); - +var _rewriteStackTrace = require("../errors/rewrite-stack-trace"); +var _configError = require("../errors/config-error"); var _files = require("./files"); - var _caching = require("./caching"); - var _configDescriptors = require("./config-descriptors"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const path = require("path"); - -const buildDebug = require("debug"); - -const debug = buildDebug("babel:config:config-chain"); - +const debug = _debug()("babel:config:config-chain"); function* buildPresetChain(arg, context) { const chain = yield* buildPresetChainWalker(arg, context); if (!chain) return null; @@ -37,7 +39,6 @@ function* buildPresetChain(arg, context) { files: new Set() }; } - const buildPresetChainWalker = makeChainWalker({ root: preset => loadPresetDescriptors(preset), env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), @@ -50,7 +51,6 @@ const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRoo const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); - function* buildRootChain(opts, context) { let configReport, babelRcReport; const programmaticLogger = new _printer.ConfigPrinter(); @@ -61,13 +61,11 @@ function* buildRootChain(opts, context) { if (!programmaticChain) return null; const programmaticReport = yield* programmaticLogger.output(); let configFile; - if (typeof opts.configFile === "string") { configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); } else if (opts.configFile !== false) { configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller); } - let { babelrc, babelrcRoots @@ -75,51 +73,40 @@ function* buildRootChain(opts, context) { let babelrcRootsDirectory = context.cwd; const configFileChain = emptyChain(); const configFileLogger = new _printer.ConfigPrinter(); - if (configFile) { const validatedFile = validateConfigFile(configFile); const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger); if (!result) return null; configReport = yield* configFileLogger.output(); - if (babelrc === undefined) { babelrc = validatedFile.options.babelrc; } - if (babelrcRoots === undefined) { babelrcRootsDirectory = validatedFile.dirname; babelrcRoots = validatedFile.options.babelrcRoots; } - mergeChain(configFileChain, result); } - let ignoreFile, babelrcFile; let isIgnored = false; const fileChain = emptyChain(); - if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") { const pkgData = yield* (0, _files.findPackageData)(context.filename); - if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { ({ ignore: ignoreFile, config: babelrcFile } = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); - if (ignoreFile) { fileChain.files.add(ignoreFile.filepath); } - if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { isIgnored = true; } - if (babelrcFile && !isIgnored) { const validatedFile = validateBabelrcFile(babelrcFile); const babelrcLogger = new _printer.ConfigPrinter(); const result = yield* loadFileChain(validatedFile, context, undefined, babelrcLogger); - if (!result) { isIgnored = true; } else { @@ -127,17 +114,14 @@ function* buildRootChain(opts, context) { mergeChain(fileChain, result); } } - if (babelrcFile && isIgnored) { fileChain.files.add(babelrcFile.filepath); } } } - if (context.showConfig) { console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n") + "\n-----End Babel configs-----"); } - const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); return { plugins: isIgnored ? [] : dedupDescriptors(chain.plugins), @@ -150,50 +134,45 @@ function* buildRootChain(opts, context) { files: chain.files }; } - 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; } - let babelrcPatterns = babelrcRoots; - if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; + if (!Array.isArray(babelrcPatterns)) { + babelrcPatterns = [babelrcPatterns]; + } babelrcPatterns = babelrcPatterns.map(pat => { - return typeof pat === "string" ? path.resolve(babelrcRootsDirectory, pat) : pat; + return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat; }); - if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { return pkgData.directories.indexOf(absoluteRoot) !== -1; } - return babelrcPatterns.some(pat => { if (typeof pat === "string") { pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); } - return pkgData.directories.some(directory => { return matchPattern(pat, babelrcRootsDirectory, directory, context); }); }); } - const validateConfigFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, - options: (0, _options.validate)("configfile", file.options) + options: (0, _options.validate)("configfile", file.options, file.filepath) })); const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, - options: (0, _options.validate)("babelrcfile", file.options) + options: (0, _options.validate)("babelrcfile", file.options, file.filepath) })); const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({ filepath: file.filepath, dirname: file.dirname, - options: (0, _options.validate)("extendsfile", file.options) + options: (0, _options.validate)("extendsfile", file.options, file.filepath) })); const loadProgrammaticChain = makeChainWalker({ root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), @@ -209,51 +188,40 @@ const loadFileChainWalker = makeChainWalker({ overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName), createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger) }); - function* loadFileChain(input, context, files, baseLogger) { const chain = yield* loadFileChainWalker(input, context, files, baseLogger); - if (chain) { chain.files.add(input.filepath); } - return chain; } - const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); const loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); const loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); - function buildFileLogger(filepath, context, baseLogger) { if (!baseLogger) { return () => {}; } - return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, { filepath }); } - function buildRootDescriptors({ dirname, options }, alias, descriptors) { return descriptors(dirname, options, alias); } - function buildProgrammaticLogger(_, context, baseLogger) { var _context$caller; - if (!baseLogger) { return () => {}; } - return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, { callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name }); } - function buildEnvDescriptors({ dirname, options @@ -261,7 +229,6 @@ function buildEnvDescriptors({ const opts = options.env && options.env[envName]; return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null; } - function buildOverrideDescriptors({ dirname, options @@ -270,7 +237,6 @@ function buildOverrideDescriptors({ if (!opts) throw new Error("Assertion failure - missing override"); return descriptors(dirname, opts, `${alias}.overrides[${index}]`); } - function buildOverrideEnvDescriptors({ dirname, options @@ -280,7 +246,6 @@ function buildOverrideEnvDescriptors({ const opts = override.env && override.env[envName]; return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null; } - function makeChainWalker({ root, env, @@ -288,41 +253,36 @@ function makeChainWalker({ overridesEnv, createLogger }) { - return function* (input, context, files = new Set(), baseLogger) { + return function* chainWalker(input, context, files = new Set(), baseLogger) { const { dirname } = input; const flattenedConfigs = []; const rootOpts = root(input); - - if (configIsApplicable(rootOpts, dirname, context)) { + if (configIsApplicable(rootOpts, dirname, context, input.filepath)) { flattenedConfigs.push({ config: rootOpts, envName: undefined, index: undefined }); const envOpts = env(input, context.envName); - - if (envOpts && configIsApplicable(envOpts, dirname, context)) { + if (envOpts && configIsApplicable(envOpts, dirname, context, input.filepath)) { flattenedConfigs.push({ config: envOpts, envName: context.envName, index: undefined }); } - (rootOpts.options.overrides || []).forEach((_, index) => { const overrideOps = overrides(input, index); - - if (configIsApplicable(overrideOps, dirname, context)) { + if (configIsApplicable(overrideOps, dirname, context, input.filepath)) { flattenedConfigs.push({ config: overrideOps, index, envName: undefined }); const overrideEnvOpts = overridesEnv(input, index, context.envName); - - if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { + if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context, input.filepath)) { flattenedConfigs.push({ config: overrideEnvOpts, index, @@ -332,7 +292,6 @@ function makeChainWalker({ } }); } - if (flattenedConfigs.some(({ config: { options: { @@ -343,10 +302,8 @@ function makeChainWalker({ }) => shouldIgnore(context, ignore, only, dirname))) { return null; } - const chain = emptyChain(); const logger = createLogger(input, context, baseLogger); - for (const { config, index, @@ -355,23 +312,18 @@ function makeChainWalker({ if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) { return null; } - logger(config, index, envName); yield* mergeChainOpts(chain, config); } - return chain; }; } - function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) { if (opts.extends === undefined) return true; const file = yield* (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, file => ` - ${file.filepath}`).join("\n")); } - files.add(file); const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger); files.delete(file); @@ -379,19 +331,15 @@ function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) { mergeChain(chain, fileChain); return true; } - function mergeChain(target, source) { target.options.push(...source.options); target.plugins.push(...source.plugins); target.presets.push(...source.presets); - for (const file of source.files) { target.files.add(file); } - return target; } - function* mergeChainOpts(target, { options, plugins, @@ -402,7 +350,6 @@ function* mergeChainOpts(target, { target.presets.push(...(yield* presets())); return target; } - function emptyChain() { return { options: [], @@ -411,7 +358,6 @@ function emptyChain() { files: new Set() }; } - function normalizeOptions(opts) { const options = Object.assign({}, opts); delete options.extends; @@ -425,31 +371,24 @@ function normalizeOptions(opts) { delete options.test; delete options.include; delete options.exclude; - if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) { options.sourceMaps = options.sourceMap; delete options.sourceMap; } - return options; } - function dedupDescriptors(items) { const map = new Map(); const descriptors = []; - for (const item of items) { if (typeof item.value === "function") { const fnKey = item.value; let nameMap = map.get(fnKey); - if (!nameMap) { nameMap = new Map(); map.set(fnKey, nameMap); } - let desc = nameMap.get(item.name); - if (!desc) { desc = { value: item @@ -465,74 +404,66 @@ function dedupDescriptors(items) { }); } } - return descriptors.reduce((acc, desc) => { acc.push(desc.value); return acc; }, []); } - 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)); +}, dirname, context, configName) { + return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname, configName)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname, configName)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname, configName)); } - -function configFieldIsApplicable(context, test, dirname) { +function configFieldIsApplicable(context, test, dirname, configName) { const patterns = Array.isArray(test) ? test : [test]; - return matchesPatterns(context, patterns, dirname); + return matchesPatterns(context, patterns, dirname, configName); +} +function ignoreListReplacer(_key, value) { + if (value instanceof RegExp) { + return String(value); + } + return value; } - function shouldIgnore(context, ignore, only, dirname) { if (ignore && matchesPatterns(context, ignore, dirname)) { var _context$filename; - - const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore)}\` from "${dirname}"`; + const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname}"`; debug(message); - if (context.showConfig) { console.log(message); } - return true; } - if (only && !matchesPatterns(context, only, dirname)) { var _context$filename2; - - const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only)}\` from "${dirname}"`; + const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`; debug(message); - if (context.showConfig) { console.log(message); } - return true; } - return false; } - -function matchesPatterns(context, patterns, dirname) { - return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context)); +function matchesPatterns(context, patterns, dirname, configName) { + return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context, configName)); } - -function matchPattern(pattern, dirname, pathToTest, context) { +function matchPattern(pattern, dirname, pathToTest, context, configName) { if (typeof pattern === "function") { - return !!pattern(pathToTest, { + return !!(0, _rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest, { dirname, envName: context.envName, caller: context.caller }); } - if (typeof pathToTest !== "string") { - throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`); + throw new _configError.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName); } - if (typeof pattern === "string") { pattern = (0, _patternToRegex.default)(pattern, dirname); } - return pattern.test(pathToTest); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=config-chain.js.map diff --git a/node_modules/@babel/core/lib/config/config-chain.js.map b/node_modules/@babel/core/lib/config/config-chain.js.map new file mode 100644 index 00000000..9202864f --- /dev/null +++ b/node_modules/@babel/core/lib/config/config-chain.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","_debug","_options","_patternToRegex","_printer","_rewriteStackTrace","_configError","_files","_caching","_configDescriptors","debug","buildDebug","buildPresetChain","arg","context","chain","buildPresetChainWalker","plugins","dedupDescriptors","presets","options","map","o","normalizeOptions","files","Set","makeChainWalker","root","preset","loadPresetDescriptors","env","envName","loadPresetEnvDescriptors","overrides","index","loadPresetOverridesDescriptors","overridesEnv","loadPresetOverridesEnvDescriptors","createLogger","exports","makeWeakCacheSync","buildRootDescriptors","alias","createUncachedDescriptors","makeStrongCacheSync","buildEnvDescriptors","buildOverrideDescriptors","buildOverrideEnvDescriptors","buildRootChain","opts","configReport","babelRcReport","programmaticLogger","ConfigPrinter","programmaticChain","loadProgrammaticChain","dirname","cwd","undefined","programmaticReport","output","configFile","loadConfig","caller","findRootConfig","babelrc","babelrcRoots","babelrcRootsDirectory","configFileChain","emptyChain","configFileLogger","validatedFile","validateConfigFile","result","loadFileChain","mergeChain","ignoreFile","babelrcFile","isIgnored","fileChain","filename","pkgData","findPackageData","babelrcLoadEnabled","ignore","config","findRelativeConfig","add","filepath","shouldIgnore","validateBabelrcFile","babelrcLogger","showConfig","console","log","filter","x","join","fileHandling","absoluteRoot","directories","indexOf","babelrcPatterns","Array","isArray","pat","path","resolve","length","some","pathPatternToRegex","directory","matchPattern","file","validate","validateExtendFile","input","createCachedDescriptors","baseLogger","buildProgrammaticLogger","loadFileChainWalker","loadFileDescriptors","loadFileEnvDescriptors","loadFileOverridesDescriptors","loadFileOverridesEnvDescriptors","buildFileLogger","configure","ChainFormatter","Config","descriptors","_","_context$caller","Programmatic","callerName","name","Error","override","chainWalker","flattenedConfigs","rootOpts","configIsApplicable","push","envOpts","forEach","overrideOps","overrideEnvOpts","only","logger","mergeExtendsChain","mergeChainOpts","extends","has","from","delete","target","source","Object","assign","passPerPreset","test","include","exclude","prototype","hasOwnProperty","call","sourceMaps","sourceMap","items","Map","item","value","fnKey","nameMap","get","set","desc","ownPass","reduce","acc","configName","configFieldIsApplicable","patterns","matchesPatterns","ignoreListReplacer","_key","RegExp","String","_context$filename","message","JSON","stringify","_context$filename2","pattern","pathToTest","endHiddenCallStack","ConfigError"],"sources":["../../src/config/config-chain.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options\";\nimport type {\n ValidatedOptions,\n IgnoreList,\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n IgnoreItem,\n} from \"./validation/options\";\nimport pathPatternToRegex from \"./pattern-to-regex\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace\";\nimport ConfigError from \"../errors/config-error\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors\";\n\nexport type ConfigChain = {\n plugins: Array;\n presets: Array;\n options: Array;\n files: Set;\n};\n\nexport type PresetInstance = {\n options: ValidatedOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => normalizeOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n ignore: IgnoreFile | void;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: ValidatedOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns as IgnoreItem];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.indexOf(absoluteRoot) !== -1;\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n if (chain) {\n chain.files.add(input.filepath);\n }\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env && options.env[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides && options.overrides[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides && options.overrides[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env && override.env[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: ValidatedOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: Array<{\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }> = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: ValidatedOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction normalizeOptions(opts: ValidatedOptions): ValidatedOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.prototype.hasOwnProperty.call(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: Array,\n): Array {\n const map: Map<\n Function,\n Map\n > = new Map();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: IgnoreList | IgnoreItem,\n): IgnoreList | IgnoreItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: IgnoreList | undefined | null,\n only: IgnoreList | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: IgnoreList,\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: IgnoreItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n"],"mappings":";;;;;;;;AAEA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,QAAA,GAAAF,OAAA;AASA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAGA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AAQA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,kBAAA,GAAAT,OAAA;AAZA,MAAMU,KAAK,GAAGC,OAASA,CAAC,CAAC,2BAA2B,CAAC;AAgD9C,UAAUC,gBAAgBA,CAC/BC,GAAmB,EACnBC,OAAY,EACiB;EAC7B,MAAMC,KAAK,GAAG,OAAOC,sBAAsB,CAACH,GAAG,EAAEC,OAAO,CAAC;EACzD,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;EAEvB,OAAO;IACLE,OAAO,EAAEC,gBAAgB,CAACH,KAAK,CAACE,OAAO,CAAC;IACxCE,OAAO,EAAED,gBAAgB,CAACH,KAAK,CAACI,OAAO,CAAC;IACxCC,OAAO,EAAEL,KAAK,CAACK,OAAO,CAACC,GAAG,CAACC,CAAC,IAAIC,gBAAgB,CAACD,CAAC,CAAC,CAAC;IACpDE,KAAK,EAAE,IAAIC,GAAG,CAA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config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js index 55cef879..4173164a 100644 --- a/node_modules/@babel/core/lib/config/config-descriptors.js +++ b/node_modules/@babel/core/lib/config/config-descriptors.js @@ -4,35 +4,32 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.createCachedDescriptors = createCachedDescriptors; -exports.createUncachedDescriptors = createUncachedDescriptors; exports.createDescriptor = createDescriptor; - +exports.createUncachedDescriptors = createUncachedDescriptors; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _functional = require("../gensync-utils/functional"); var _files = require("./files"); - var _item = require("./item"); - var _caching = require("./caching"); - var _resolveTargets = require("./resolve-targets"); - -const gensync = require("gensync"); - 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* handlerOf(value) { return value; } - function optionsWithResolvedBrowserslistConfigFile(options, dirname) { if (typeof options.browserslistConfigFile === "string") { options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname); } - return options; } - function createCachedDescriptors(dirname, options, alias) { const { plugins, @@ -45,32 +42,13 @@ function createCachedDescriptors(dirname, options, alias) { presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([]) }; } - function createUncachedDescriptors(dirname, options, alias) { - let plugins; - let presets; return { options: optionsWithResolvedBrowserslistConfigFile(options, dirname), - - *plugins() { - if (!plugins) { - plugins = yield* createPluginDescriptors(options.plugins || [], dirname, alias); - } - - return plugins; - }, - - *presets() { - if (!presets) { - presets = yield* createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset); - } - - return presets; - } - + plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname, alias)), + presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset)) }; } - const PRESET_DESCRIPTOR_CACHE = new WeakMap(); const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => { const dirname = cache.using(dir => dir); @@ -88,7 +66,6 @@ const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, ca }); }); const DEFAULT_OPTIONS = {}; - function loadCachedDescriptor(cache, desc) { const { value, @@ -96,42 +73,32 @@ function loadCachedDescriptor(cache, desc) { } = 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 yield* createDescriptors("preset", items, dirname, alias, passPerPreset); } - function* createPluginDescriptors(items, dirname, alias) { return yield* createDescriptors("plugin", items, dirname, alias); } - function* createDescriptors(type, items, dirname, alias, ownPass) { - const descriptors = yield* gensync.all(items.map((item, index) => createDescriptor(item, dirname, { + const descriptors = yield* _gensync().all(items.map((item, index) => createDescriptor(item, dirname, { type, alias: `${alias}$${index}`, ownPass: !!ownPass @@ -139,22 +106,18 @@ function* createDescriptors(type, items, dirname, alias, ownPass) { assertNoDuplicates(descriptors); return descriptors; } - function* createDescriptor(pair, dirname, { type, alias, ownPass }) { const desc = (0, _item.getItemDescriptor)(pair); - if (desc) { return desc; } - let name; let options; let value = pair; - if (Array.isArray(value)) { if (value.length === 3) { [value, options, name] = value; @@ -162,15 +125,12 @@ function* createDescriptor(pair, dirname, { [value, options] = value; } } - 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"); } - const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; const request = value; ({ @@ -182,11 +142,9 @@ function* createDescriptor(pair, dirname, { resolved: filepath }; } - if (!value) { throw new Error(`Unexpected falsy value: ${String(value)}`); } - if (typeof value === "object" && value.__esModule) { if (value.default) { value = value.default; @@ -194,15 +152,12 @@ function* createDescriptor(pair, dirname, { throw new Error("Must export a default export when using ES6 modules."); } } - if (typeof value !== "object" && typeof value !== "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}`); } - return { name, alias: filepath || alias, @@ -213,24 +168,22 @@ function* createDescriptor(pair, dirname, { file }; } - function assertNoDuplicates(items) { const map = new Map(); - for (const item of items) { if (typeof item.value !== "function") continue; let nameMap = map.get(item.value); - if (!nameMap) { nameMap = new Set(); map.set(item.value, nameMap); } - if (nameMap.has(item.name)) { const conflicts = items.filter(i => i.value === item.value); 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'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n")); } - nameMap.add(item.name); } -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=config-descriptors.js.map diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js.map b/node_modules/@babel/core/lib/config/config-descriptors.js.map new file mode 100644 index 00000000..a5846bf9 --- /dev/null +++ b/node_modules/@babel/core/lib/config/config-descriptors.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_functional","_files","_item","_caching","_resolveTargets","isEqualDescriptor","a","b","name","value","options","dirname","alias","ownPass","file","request","resolved","handlerOf","optionsWithResolvedBrowserslistConfigFile","browserslistConfigFile","resolveBrowserslistConfigFile","createCachedDescriptors","plugins","presets","passPerPreset","createCachedPluginDescriptors","createCachedPresetDescriptors","createUncachedDescriptors","once","createPluginDescriptors","createPresetDescriptors","PRESET_DESCRIPTOR_CACHE","WeakMap","makeWeakCacheSync","items","cache","using","dir","makeStrongCacheSync","makeStrongCache","descriptors","map","desc","loadCachedDescriptor","PLUGIN_DESCRIPTOR_CACHE","DEFAULT_OPTIONS","cacheByOptions","get","set","possibilities","indexOf","matches","filter","possibility","length","push","createDescriptors","type","gensync","all","item","index","createDescriptor","assertNoDuplicates","pair","getItemDescriptor","Array","isArray","undefined","filepath","Error","resolver","loadPlugin","loadPreset","String","__esModule","default","Map","nameMap","Set","has","conflicts","i","JSON","stringify","join","add"],"sources":["../../src/config/config-descriptors.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional\";\n\nimport { loadPlugin, loadPreset } from \"./files\";\n\nimport { getItemDescriptor } from \"./item\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\n\nimport type {\n ValidatedOptions,\n PluginList,\n PluginItem,\n} from \"./validation/options\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: ValidatedOptions;\n plugins: () => Handler>;\n presets: () => Handler>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport type UnloadedDescriptor = {\n name: string | undefined;\n value: any | Function;\n options: {} | undefined | false;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n};\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n (a.file && a.file.request) === (b.file && b.file.request) &&\n (a.file && a.file.resolved) === (b.file && b.file.resolved)\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: ValidatedOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: ValidatedOptions,\n dirname: string,\n): ValidatedOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: ValidatedOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginList, cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap<{} | Function, WeakMap<{}, Array>>,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (possibilities.indexOf(desc) === -1) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginList,\n dirname: string,\n alias: string,\n): Handler> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: \"plugin\" | \"preset\",\n items: PluginList,\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n // todo(flow->ts) better type annotation\n let value: any = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n if (typeof value === \"object\" && value.__esModule) {\n if (value.default) {\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: Array): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAaA,IAAAK,eAAA,GAAAL,OAAA;AA2BA,SAASM,iBAAiBA,CACxBC,CAAqB,EACrBC,CAAqB,EACZ;EACT,OACED,CAAC,CAACE,IAAI,KAAKD,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,OAAO,CAACQ,GAAG,CAAC1B,IAAI,CAACpD,IAAI,CAAC;EACxB;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js index 8836388b..414cef79 100644 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ b/node_modules/@babel/core/lib/config/files/configuration.js @@ -3,213 +3,107 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.ROOT_CONFIG_FILENAMES = void 0; exports.findConfigUpwards = findConfigUpwards; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; exports.loadConfig = loadConfig; exports.resolveShowConfigPath = resolveShowConfigPath; -exports.ROOT_CONFIG_FILENAMES = void 0; - -var _caching = require("../caching"); - -var _configApi = require("../helpers/config-api"); - -var _utils = require("./utils"); - -var _moduleTypes = _interopRequireDefault(require("./module-types")); - -var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex")); - -var fs = _interopRequireWildcard(require("../../gensync-utils/fs")); - -function _module() { - const data = require("module"); - - _module = function () { +function _debug() { + const data = require("debug"); + _debug = function () { return data; }; - return data; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const buildDebug = require("debug"); - -const path = require("path"); - -const json5 = require("json5"); - -const gensync = require("gensync"); - -const debug = buildDebug("babel:config:loading:files:configuration"); -const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"]; -exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; -const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"]; -const BABELIGNORE_FILENAME = ".babelignore"; - -function* findConfigUpwards(rootDir) { - let dirname = rootDir; - - while (true) { - for (const filename of ROOT_CONFIG_FILENAMES) { - if (yield* fs.exists(path.join(dirname, filename))) { - return dirname; - } - } - - const nextDir = path.dirname(dirname); - if (dirname === nextDir) break; - dirname = nextDir; - } - - return null; -} - -function* findRelativeConfig(packageData, envName, caller) { - let config = null; - let ignore = null; - const dirname = path.dirname(packageData.filepath); - - for (const loc of packageData.directories) { - if (!config) { - var _packageData$pkg; - - config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null); - } - - if (!ignore) { - const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME); - ignore = yield* readIgnoreConfig(ignoreLoc); - - if (ignore) { - debug("Found ignore %o from %o.", ignore.filepath, dirname); - } - } - } - - return { - config, - ignore +function _fs() { + const data = require("fs"); + _fs = function () { + return data; }; + return data; } - -function findRootConfig(dirname, envName, caller) { - return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller); -} - -function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) { - const configs = yield* gensync.all(names.map(filename => readConfig(path.join(dirname, filename), envName, caller))); - const config = configs.reduce((previousConfig, config) => { - if (config && previousConfig) { - throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${path.basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`); - } - - return config || previousConfig; - }, previousConfig); - - if (config) { - debug("Found configuration %o from %o.", config.filepath, dirname); - } - - return config; +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; } - -function* loadConfig(name, dirname, envName, caller) { - const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(name, { - paths: [dirname] - }); - const conf = yield* readConfig(filepath, envName, caller); - - if (!conf) { - throw new Error(`Config file ${filepath} contains no configuration data`); - } - - debug("Loaded config %o from %o.", name, dirname); - return conf; +function _json() { + const data = require("json5"); + _json = function () { + return data; + }; + return data; } - -function readConfig(filepath, envName, caller) { - const ext = path.extname(filepath); - return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, { - envName, - caller - }) : readConfigJSON5(filepath); +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; } - +var _caching = require("../caching"); +var _configApi = require("../helpers/config-api"); +var _utils = require("./utils"); +var _moduleTypes = require("./module-types"); +var _patternToRegex = require("../pattern-to-regex"); +var _configError = require("../../errors/config-error"); +var fs = require("../../gensync-utils/fs"); +var _rewriteStackTrace = require("../../errors/rewrite-stack-trace"); +const debug = _debug()("babel:config:loading:files:configuration"); +const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"]; +exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; +const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"]; +const BABELIGNORE_FILENAME = ".babelignore"; const LOADING_CONFIGS = new Set(); -const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) { - if (!fs.exists.sync(filepath)) { +const readConfigCode = (0, _caching.makeStrongCache)(function* readConfigCode(filepath, cache) { + if (!_fs().existsSync(filepath)) { cache.never(); return null; } - if (LOADING_CONFIGS.has(filepath)) { cache.never(); debug("Auto-ignoring usage of config %o.", filepath); return { filepath, - dirname: path.dirname(filepath), + dirname: _path().dirname(filepath), options: {} }; } - let options; - try { LOADING_CONFIGS.add(filepath); options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously."); - } catch (err) { - err.message = `${filepath}: Error while loading config - ${err.message}`; - throw err; } finally { LOADING_CONFIGS.delete(filepath); } - let assertCache = false; - if (typeof options === "function") { yield* []; - options = options((0, _configApi.makeConfigAPI)(cache)); + options = (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache)); assertCache = true; } - if (!options || typeof options !== "object" || Array.isArray(options)) { - throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`); + throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath); } - 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 _configError.default(`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.`, filepath); } - - if (assertCache && !cache.configured()) throwConfigError(); + if (assertCache && !cache.configured()) throwConfigError(filepath); return { filepath, - dirname: path.dirname(filepath), + dirname: _path().dirname(filepath), options }; }); const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(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 _configError.default(`.babel property must be an object`, file.filepath); } - return { filepath: file.filepath, dirname: file.dirname, @@ -218,66 +112,139 @@ const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => { }); const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => { let options; - try { - options = json5.parse(content); + options = _json().parse(content); } catch (err) { - err.message = `${filepath}: Error while parsing config - ${err.message}`; - throw err; + throw new _configError.default(`Error while parsing config - ${err.message}`, filepath); } - - if (!options) throw new Error(`${filepath}: No config detected`); - + if (!options) throw new _configError.default(`No config detected`, filepath); if (typeof options !== "object") { - throw new Error(`${filepath}: Config returned typeof ${typeof options}`); + throw new _configError.default(`Config returned typeof ${typeof options}`, filepath); } - if (Array.isArray(options)) { - throw new Error(`${filepath}: Expected config object but found array`); + throw new _configError.default(`Expected config object but found array`, filepath); } - + delete options["$schema"]; return { filepath, - dirname: path.dirname(filepath), + dirname: _path().dirname(filepath), options }; }); const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => { - const ignoreDir = path.dirname(filepath); + const ignoreDir = _path().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.`); + throw new _configError.default(`Negation of file paths is not supported.`, filepath); } } - return { filepath, - dirname: path.dirname(filepath), + dirname: _path().dirname(filepath), ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir)) }; }); - +function findConfigUpwards(rootDir) { + let dirname = rootDir; + for (;;) { + for (const filename of ROOT_CONFIG_FILENAMES) { + if (_fs().existsSync(_path().join(dirname, filename))) { + return dirname; + } + } + const nextDir = _path().dirname(dirname); + if (dirname === nextDir) break; + dirname = nextDir; + } + return null; +} +function* findRelativeConfig(packageData, envName, caller) { + let config = null; + let ignore = null; + const dirname = _path().dirname(packageData.filepath); + for (const loc of packageData.directories) { + if (!config) { + var _packageData$pkg; + config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null); + } + if (!ignore) { + const ignoreLoc = _path().join(loc, BABELIGNORE_FILENAME); + ignore = yield* readIgnoreConfig(ignoreLoc); + if (ignore) { + debug("Found ignore %o from %o.", ignore.filepath, dirname); + } + } + } + return { + config, + ignore + }; +} +function findRootConfig(dirname, envName, caller) { + return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller); +} +function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) { + const configs = yield* _gensync().all(names.map(filename => readConfig(_path().join(dirname, filename), envName, caller))); + const config = configs.reduce((previousConfig, config) => { + if (config && previousConfig) { + throw new _configError.default(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`); + } + return config || previousConfig; + }, previousConfig); + if (config) { + debug("Found configuration %o from %o.", config.filepath, dirname); + } + return config; +} +function* loadConfig(name, dirname, envName, caller) { + const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { + paths: [b] + }, M = require("module")) => { + let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); + if (f) return f; + f = new Error(`Cannot resolve module '${r}'`); + f.code = "MODULE_NOT_FOUND"; + throw f; + })(name, { + paths: [dirname] + }); + const conf = yield* readConfig(filepath, envName, caller); + if (!conf) { + throw new _configError.default(`Config file contains no configuration data`, filepath); + } + debug("Loaded config %o from %o.", name, dirname); + return conf; +} +function readConfig(filepath, envName, caller) { + const ext = _path().extname(filepath); + switch (ext) { + case ".js": + case ".cjs": + case ".mjs": + case ".cts": + return readConfigCode(filepath, { + envName, + caller + }); + default: + return readConfigJSON5(filepath); + } +} function* resolveShowConfigPath(dirname) { const targetPath = process.env.BABEL_SHOW_CONFIG_FOR; - if (targetPath != null) { - const absolutePath = path.resolve(dirname, targetPath); + const absolutePath = _path().resolve(dirname, targetPath); const stats = yield* fs.stat(absolutePath); - if (!stats.isFile()) { throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`); } - return absolutePath; } - return null; } - -function throwConfigError() { - throw new Error(`\ +function throwConfigError(filepath) { + throw new _configError.default(`\ 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: @@ -310,5 +277,8 @@ module.exports = function(api) { // Return the value that will be cached. return { }; -};`); -} \ No newline at end of file +};`, filepath); +} +0 && 0; + +//# sourceMappingURL=configuration.js.map diff --git a/node_modules/@babel/core/lib/config/files/configuration.js.map b/node_modules/@babel/core/lib/config/files/configuration.js.map new file mode 100644 index 00000000..9fe5cdf4 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/configuration.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_debug","data","require","_fs","_path","_json","_gensync","_caching","_configApi","_utils","_moduleTypes","_patternToRegex","_configError","fs","_rewriteStackTrace","debug","buildDebug","ROOT_CONFIG_FILENAMES","exports","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","LOADING_CONFIGS","Set","readConfigCode","makeStrongCache","filepath","cache","nodeFs","existsSync","never","has","dirname","path","options","add","loadCodeDefault","delete","assertCache","endHiddenCallStack","makeConfigAPI","Array","isArray","ConfigError","then","configured","throwConfigError","packageToBabelConfig","makeWeakCacheSync","file","babel","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","pattern","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","_packageData$pkg","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","v","w","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","conf","ext","extname","resolveShowConfigPath","targetPath","env","BABEL_SHOW_CONFIG_FOR","absolutePath","stats","stat","isFile"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"fs\";\nimport path from \"path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeStrongCache, makeWeakCacheSync } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport { makeConfigAPI } from \"../helpers/config-api\";\nimport type { ConfigAPI } from \"../helpers/config-api\";\nimport { makeStaticFileCache } from \"./utils\";\nimport loadCodeDefault from \"./module-types\";\nimport pathPatternToRegex from \"../pattern-to-regex\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types\";\nimport type { CallerMetadata } from \"../validation/options\";\nimport ConfigError from \"../../errors/config-error\";\n\nimport * as fs from \"../../gensync-utils/fs\";\n\nimport { createRequire } from \"module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n \"babel.config.js\",\n \"babel.config.cjs\",\n \"babel.config.mjs\",\n \"babel.config.json\",\n \"babel.config.cts\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n \".babelrc\",\n \".babelrc.js\",\n \".babelrc.cjs\",\n \".babelrc.mjs\",\n \".babelrc.json\",\n \".babelrc.cts\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\nconst LOADING_CONFIGS = new Set();\n\nconst readConfigCode = makeStrongCache(function* readConfigCode(\n filepath: string,\n cache: CacheConfigurator<{\n envName: string;\n caller: CallerMetadata | undefined;\n }>,\n): Handler {\n if (!nodeFs.existsSync(filepath)) {\n cache.never();\n return null;\n }\n\n // The `require()` call below can make this code reentrant if a require hook like @babel/register has been\n // loaded into the system. That would cause Babel to attempt to compile the `.babelrc.js` file as it loads\n // below. To cover this case, we auto-ignore re-entrant config processing.\n if (LOADING_CONFIGS.has(filepath)) {\n cache.never();\n\n debug(\"Auto-ignoring usage of config %o.\", filepath);\n return {\n filepath,\n dirname: path.dirname(filepath),\n options: {},\n };\n }\n\n let options: unknown;\n try {\n LOADING_CONFIGS.add(filepath);\n options = yield* loadCodeDefault(\n filepath,\n \"You appear to be using a native ECMAScript module configuration \" +\n \"file, which is only supported when running Babel asynchronously.\",\n );\n } finally {\n LOADING_CONFIGS.delete(filepath);\n }\n\n let assertCache = false;\n if (typeof options === \"function\") {\n // @ts-expect-error - if we want to make it possible to use async configs\n yield* [];\n\n options = endHiddenCallStack(options as any as (api: ConfigAPI) => {})(\n makeConfigAPI(cache),\n );\n\n assertCache = true;\n }\n\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new ConfigError(\n `Configuration should be an exported JavaScript object.`,\n filepath,\n );\n }\n\n // @ts-expect-error todo(flow->ts)\n if (typeof options.then === \"function\") {\n throw new ConfigError(\n `You appear to be using an async configuration, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously return your config.`,\n filepath,\n );\n }\n\n if (assertCache && !cache.configured()) throwConfigError(filepath);\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst packageToBabelConfig = makeWeakCacheSync(\n (file: ConfigFile): ConfigFile | null => {\n const babel: unknown = file.options[\"babel\"];\n\n if (typeof babel === \"undefined\") return null;\n\n if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n throw new ConfigError(`.babel property must be an object`, file.filepath);\n }\n\n return {\n filepath: file.filepath,\n dirname: file.dirname,\n options: babel,\n };\n },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n let options;\n try {\n options = json5.parse(content);\n } catch (err) {\n throw new ConfigError(\n `Error while parsing config - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new ConfigError(`No config detected`, filepath);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n delete options[\"$schema\"];\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n const ignoreDir = path.dirname(filepath);\n const ignorePatterns = content\n .split(\"\\n\")\n .map(line => line.replace(/#(.*?)$/, \"\").trim())\n .filter(line => !!line);\n\n for (const pattern of ignorePatterns) {\n if (pattern[0] === \"!\") {\n throw new ConfigError(\n `Negation of file paths is not supported.`,\n filepath,\n );\n }\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n ignore: ignorePatterns.map(pattern =>\n pathPatternToRegex(pattern, ignoreDir),\n ),\n };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n let dirname = rootDir;\n for (;;) {\n for (const filename of ROOT_CONFIG_FILENAMES) {\n if (nodeFs.existsSync(path.join(dirname, filename))) {\n return dirname;\n }\n }\n\n const nextDir = path.dirname(dirname);\n if (dirname === nextDir) break;\n dirname = nextDir;\n }\n\n return null;\n}\n\nexport function* findRelativeConfig(\n packageData: FilePackageData,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n let config = null;\n let ignore = null;\n\n const dirname = path.dirname(packageData.filepath);\n\n for (const loc of packageData.directories) {\n if (!config) {\n config = yield* loadOneConfig(\n RELATIVE_CONFIG_FILENAMES,\n loc,\n envName,\n caller,\n packageData.pkg?.dirname === loc\n ? packageToBabelConfig(packageData.pkg)\n : null,\n );\n }\n\n if (!ignore) {\n const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n ignore = yield* readIgnoreConfig(ignoreLoc);\n\n if (ignore) {\n debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n }\n }\n }\n\n return { config, ignore };\n}\n\nexport function findRootConfig(\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n names: string[],\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n previousConfig: ConfigFile | null = null,\n): Handler {\n const configs = yield* gensync.all(\n names.map(filename =>\n readConfig(path.join(dirname, filename), envName, caller),\n ),\n );\n const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n if (config && previousConfig) {\n throw new ConfigError(\n `Multiple configuration files found. Please remove one:\\n` +\n ` - ${path.basename(previousConfig.filepath)}\\n` +\n ` - ${config.filepath}\\n` +\n `from ${dirname}`,\n );\n }\n\n return config || previousConfig;\n }, previousConfig);\n\n if (config) {\n debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n }\n return config;\n}\n\nexport function* loadConfig(\n name: string,\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const filepath = require.resolve(name, { paths: [dirname] });\n\n const conf = yield* readConfig(filepath, envName, caller);\n if (!conf) {\n throw new ConfigError(\n `Config file contains no configuration data`,\n filepath,\n );\n }\n\n debug(\"Loaded config %o from %o.\", name, dirname);\n return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n filepath: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const ext = path.extname(filepath);\n switch (ext) {\n case \".js\":\n case \".cjs\":\n case \".mjs\":\n case \".cts\":\n return readConfigCode(filepath, { envName, caller });\n default:\n return readConfigJSON5(filepath);\n }\n}\n\nexport function* resolveShowConfigPath(\n dirname: string,\n): Handler {\n const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n if (targetPath != null) {\n const absolutePath = path.resolve(dirname, targetPath);\n const stats = yield* fs.stat(absolutePath);\n if (!stats.isFile()) {\n throw new Error(\n `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n );\n }\n return absolutePath;\n }\n return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n throw new ConfigError(\n `\\\nCaching 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};`,\n filepath,\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,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,IAAI,CAACC,KAAK,CAACE,MAAM,CAAC,CAAC,EAAE;MACnB,MAAM,IAAIZ,KAAK,CACZ,GAAES,YAAa,sFAClB,CAAC;IACH;IACA,OAAOA,YAAY;EACrB;EACA,OAAO,IAAI;AACb;AAEA,SAAS1E,gBAAgBA,CAACpB,QAAgB,EAAS;EACjD,MAAM,IAAIiB,oBAAW,CAClB;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACCjB,QACF,CAAC;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js new file mode 100644 index 00000000..16eef9cb --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = resolve; +var _importMetaResolve = require("../../vendor/import-meta-resolve"); +let importMetaResolve; +{ + importMetaResolve = _importMetaResolve.resolve; +} +function resolve(specifier, parent) { + return importMetaResolve(specifier, parent); +} +0 && 0; + +//# sourceMappingURL=import-meta-resolve.js.map diff --git a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map new file mode 100644 index 00000000..9a087f2a --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_importMetaResolve","require","importMetaResolve","polyfill","resolve","specifier","parent"],"sources":["../../../src/config/files/import-meta-resolve.ts"],"sourcesContent":["import { resolve as polyfill } from \"../../vendor/import-meta-resolve\";\n\nlet importMetaResolve: (specifier: string, parent: string) => string;\n\nif (USE_ESM) {\n // Node.js < 20, when using the `--experimental-import-meta-resolve` flag,\n // have an asynchronous implementation of import.meta.resolve.\n if (\n typeof import.meta.resolve === \"function\" &&\n typeof import.meta.resolve(import.meta.url) === \"string\"\n ) {\n // @ts-expect-error: TS defines import.meta as returning a promise\n importMetaResolve = import.meta.resolve;\n } else {\n importMetaResolve = polyfill;\n }\n} else {\n importMetaResolve = polyfill;\n}\n\nexport default function resolve(\n specifier: string,\n parent?: string | URL,\n): string {\n // @ts-expect-error: TS defines import.meta.resolve as returning a promises\n return importMetaResolve(specifier, parent);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,IAAIC,iBAAgE;AAc7D;EACLA,iBAAiB,GAAGC,0BAAQ;AAC9B;AAEe,SAASC,OAAOA,CAC7BC,SAAiB,EACjBC,MAAqB,EACb;EAER,OAAOJ,iBAAiB,CAACG,SAAS,EAAEC,MAAM,CAAC;AAC7C;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import.cjs b/node_modules/@babel/core/lib/config/files/import.cjs new file mode 100644 index 00000000..46fa5d5c --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/import.cjs @@ -0,0 +1,6 @@ +module.exports = function import_(filepath) { + return import(filepath); +}; +0 && 0; + +//# sourceMappingURL=import.cjs.map diff --git a/node_modules/@babel/core/lib/config/files/import.cjs.map b/node_modules/@babel/core/lib/config/files/import.cjs.map new file mode 100644 index 00000000..90ec9681 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/import.cjs.map @@ -0,0 +1 @@ +{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAOA,CAACC,QAAQ,EAAE;EAC1C,OAAO,MAAM,CAACA,QAAQ,CAAC;AACzB,CAAC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import.js b/node_modules/@babel/core/lib/config/files/import.js deleted file mode 100644 index c0acc2b6..00000000 --- a/node_modules/@babel/core/lib/config/files/import.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = import_; - -function import_(filepath) { - return import(filepath); -} \ 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 abe5fbd1..903b7957 100644 --- a/node_modules/@babel/core/lib/config/files/index-browser.js +++ b/node_modules/@babel/core/lib/config/files/index-browser.js @@ -3,22 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.ROOT_CONFIG_FILENAMES = void 0; exports.findConfigUpwards = findConfigUpwards; exports.findPackageData = findPackageData; exports.findRelativeConfig = findRelativeConfig; exports.findRootConfig = findRootConfig; exports.loadConfig = loadConfig; -exports.resolveShowConfigPath = resolveShowConfigPath; -exports.resolvePlugin = resolvePlugin; -exports.resolvePreset = resolvePreset; exports.loadPlugin = loadPlugin; exports.loadPreset = loadPreset; -exports.ROOT_CONFIG_FILENAMES = void 0; - -function* findConfigUpwards(rootDir) { +exports.resolvePlugin = resolvePlugin; +exports.resolvePreset = resolvePreset; +exports.resolveShowConfigPath = resolveShowConfigPath; +function findConfigUpwards(rootDir) { return null; } - function* findPackageData(filepath) { return { filepath, @@ -27,42 +25,35 @@ function* findPackageData(filepath) { isPackage: false }; } - function* findRelativeConfig(pkgData, envName, caller) { return { - pkg: null, config: null, ignore: null }; } - function* findRootConfig(dirname, envName, caller) { return null; } - function* loadConfig(name, dirname, envName, caller) { throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); } - function* resolveShowConfigPath(dirname) { return null; } - const ROOT_CONFIG_FILENAMES = []; exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; - function resolvePlugin(name, dirname) { return null; } - function resolvePreset(name, dirname) { return null; } - function loadPlugin(name, dirname) { 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`); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=index-browser.js.map diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js.map b/node_modules/@babel/core/lib/config/files/index-browser.js.map new file mode 100644 index 00000000..896e2a3c --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/index-browser.js.map @@ -0,0 +1 @@ +{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\n\nimport type { CallerMetadata } from \"../validation/options\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAE,eAAcD,IAAK,gBAAeF,OAAQ,eAAc,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAG,EAAE;AAACC,OAAA,CAAAD,qBAAA,GAAAA,qBAAA;AAG3C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eACpD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACZ,sBAAqBD,IAAK,gBAAeF,OAAQ,eACpD,CAAC;AACH;AAAC"} \ 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 f75ace5a..d11981e0 100644 --- a/node_modules/@babel/core/lib/config/files/index.js +++ b/node_modules/@babel/core/lib/config/files/index.js @@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); -Object.defineProperty(exports, "findPackageData", { +Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", { enumerable: true, get: function () { - return _package.findPackageData; + return _configuration.ROOT_CONFIG_FILENAMES; } }); Object.defineProperty(exports, "findConfigUpwards", { @@ -15,6 +15,12 @@ Object.defineProperty(exports, "findConfigUpwards", { return _configuration.findConfigUpwards; } }); +Object.defineProperty(exports, "findPackageData", { + enumerable: true, + get: function () { + return _package.findPackageData; + } +}); Object.defineProperty(exports, "findRelativeConfig", { enumerable: true, get: function () { @@ -33,16 +39,16 @@ Object.defineProperty(exports, "loadConfig", { return _configuration.loadConfig; } }); -Object.defineProperty(exports, "resolveShowConfigPath", { +Object.defineProperty(exports, "loadPlugin", { enumerable: true, get: function () { - return _configuration.resolveShowConfigPath; + return _plugins.loadPlugin; } }); -Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", { +Object.defineProperty(exports, "loadPreset", { enumerable: true, get: function () { - return _configuration.ROOT_CONFIG_FILENAMES; + return _plugins.loadPreset; } }); Object.defineProperty(exports, "resolvePlugin", { @@ -57,23 +63,16 @@ Object.defineProperty(exports, "resolvePreset", { return _plugins.resolvePreset; } }); -Object.defineProperty(exports, "loadPlugin", { - enumerable: true, - get: function () { - return _plugins.loadPlugin; - } -}); -Object.defineProperty(exports, "loadPreset", { +Object.defineProperty(exports, "resolveShowConfigPath", { enumerable: true, get: function () { - return _plugins.loadPreset; + return _configuration.resolveShowConfigPath; } }); - var _package = require("./package"); - var _configuration = require("./configuration"); - var _plugins = require("./plugins"); +({}); +0 && 0; -({}); \ No newline at end of file +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/config/files/index.js.map b/node_modules/@babel/core/lib/config/files/index.js.map new file mode 100644 index 00000000..965cc188 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_package","require","_configuration","_plugins"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({}) as any as indexBrowserType as indexType;\n\nexport { findPackageData } from \"./package\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types\";\nexport {\n loadPlugin,\n loadPreset,\n resolvePlugin,\n resolvePreset,\n} from \"./plugins\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AAlBA,CAAC,CAAC,CAAC;AAA0C"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/module-types.js b/node_modules/@babel/core/lib/config/files/module-types.js index aa405021..60dda9b7 100644 --- a/node_modules/@babel/core/lib/config/files/module-types.js +++ b/node_modules/@babel/core/lib/config/files/module-types.js @@ -3,94 +3,153 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = loadCjsOrMjsDefault; - +exports.default = loadCodeDefault; +exports.supportsESM = void 0; var _async = require("../../gensync-utils/async"); - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} function _url() { const data = require("url"); - _url = function () { return data; }; - return data; } - -function _module() { - const data = require("module"); - - _module = function () { +function _semver() { + const data = require("semver"); + _semver = function () { return data; }; - return data; } - +var _rewriteStackTrace = require("../../errors/rewrite-stack-trace"); +var _configError = require("../../errors/config-error"); +var _transformFile = require("../../transform-file"); 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); } } - 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); }); }; } - -const path = require("path"); - let import_; - try { - import_ = require("./import").default; + import_ = require("./import.cjs"); } catch (_unused) {} - -function* loadCjsOrMjsDefault(filepath, asyncError, fallbackToTranspiledModule = false) { - switch (guessJSModuleType(filepath)) { - case "cjs": - return loadCjsDefault(filepath, fallbackToTranspiledModule); - - case "unknown": +const supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); +exports.supportsESM = supportsESM; +function* loadCodeDefault(filepath, asyncError) { + switch (_path().extname(filepath)) { + case ".cjs": + { + return loadCjsDefault(filepath, arguments[2]); + } + case ".mjs": + break; + case ".cts": + return loadCtsDefault(filepath); + default: try { - return loadCjsDefault(filepath, fallbackToTranspiledModule); + { + return loadCjsDefault(filepath, arguments[2]); + } } catch (e) { if (e.code !== "ERR_REQUIRE_ESM") throw e; } - - case "mjs": - if (yield* (0, _async.isAsync)()) { - return yield* (0, _async.waitFor)(loadMjsDefault(filepath)); - } - - throw new Error(asyncError); } + if (yield* (0, _async.isAsync)()) { + return yield* (0, _async.waitFor)(loadMjsDefault(filepath)); + } + throw new _configError.default(asyncError, filepath); } - -function guessJSModuleType(filename) { - switch (path.extname(filename)) { - case ".cjs": - return "cjs"; - - case ".mjs": - return "mjs"; - - default: - return "unknown"; +function loadCtsDefault(filepath) { + const ext = ".cts"; + const hasTsSupport = !!(require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]); + let handler; + if (!hasTsSupport) { + const opts = { + babelrc: false, + configFile: false, + sourceType: "unambiguous", + sourceMaps: "inline", + sourceFileName: _path().basename(filepath), + presets: [[getTSPreset(filepath), Object.assign({ + onlyRemoveTypeImports: true, + optimizeConstEnums: true + }, { + allowDeclareFields: true + })]] + }; + handler = function (m, filename) { + if (handler && filename.endsWith(ext)) { + try { + return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, { + filename + })).code, filename); + } catch (error) { + if (!hasTsSupport) { + const packageJson = require("@babel/preset-typescript/package.json"); + if (_semver().lt(packageJson.version, "7.21.4")) { + console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`."); + } + } + throw error; + } + } + return require.extensions[".js"](m, filename); + }; + require.extensions[ext] = handler; + } + try { + const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath); + return module != null && module.__esModule ? module.default : module; + } finally { + if (!hasTsSupport) { + if (require.extensions[ext] === handler) delete require.extensions[ext]; + handler = undefined; + } } } - -function loadCjsDefault(filepath, fallbackToTranspiledModule) { - const module = require(filepath); - - return module != null && module.__esModule ? module.default || (fallbackToTranspiledModule ? module : undefined) : module; +function loadCjsDefault(filepath) { + const module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath); + { + return module != null && module.__esModule ? module.default || (arguments[1] ? module : undefined) : module; + } } - function loadMjsDefault(_x) { return _loadMjsDefault.apply(this, arguments); } - function _loadMjsDefault() { _loadMjsDefault = _asyncToGenerator(function* (filepath) { if (!import_) { - throw new Error("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n"); + throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath); } - - const module = yield import_((0, _url().pathToFileURL)(filepath)); + const module = yield (0, _rewriteStackTrace.endHiddenCallStack)(import_)((0, _url().pathToFileURL)(filepath)); return module.default; }); return _loadMjsDefault.apply(this, arguments); -} \ No newline at end of file +} +function getTSPreset(filepath) { + try { + return require("@babel/preset-typescript"); + } catch (error) { + if (error.code !== "MODULE_NOT_FOUND") throw error; + let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!"; + { + if (process.versions.pnp) { + message += ` +If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file: + +packageExtensions: +\t"@babel/core@*": +\t\tpeerDependencies: +\t\t\t"@babel/preset-typescript": "*" +`; + } + } + throw new _configError.default(message, filepath); + } +} +0 && 0; + +//# sourceMappingURL=module-types.js.map diff --git a/node_modules/@babel/core/lib/config/files/module-types.js.map b/node_modules/@babel/core/lib/config/files/module-types.js.map new file mode 100644 index 00000000..e749a249 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/module-types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_async","require","_path","data","_url","_semver","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","import_","_unused","supportsESM","semver","satisfies","process","versions","node","exports","loadCodeDefault","filepath","asyncError","path","extname","loadCjsDefault","loadCtsDefault","e","code","isAsync","waitFor","loadMjsDefault","ConfigError","ext","hasTsSupport","extensions","handler","opts","babelrc","configFile","sourceType","sourceMaps","sourceFileName","basename","presets","getTSPreset","Object","assign","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","m","filename","endsWith","_compile","transformFileSync","packageJson","lt","version","console","module","endHiddenCallStack","__esModule","default","_x","_loadMjsDefault","pathToFileURL","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async\";\nimport type { Handler } from \"gensync\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { createRequire } from \"module\";\nimport semver from \"semver\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace\";\nimport ConfigError from \"../../errors/config-error\";\n\nimport type { InputOptions } from \"..\";\nimport { transformFileSync } from \"../../transform-file\";\n\nconst require = createRequire(import.meta.url);\n\nlet import_: ((specifier: string | URL) => any) | undefined;\ntry {\n // Old Node.js versions don't support import() syntax.\n import_ = require(\"./import.cjs\");\n} catch {}\n\nexport const supportsESM = semver.satisfies(\n process.versions.node,\n // older versions, starting from 10, support the dynamic\n // import syntax but always return a rejected promise.\n \"^12.17 || >=13.2\",\n);\n\nexport default function* loadCodeDefault(\n filepath: string,\n asyncError: string,\n): Handler {\n switch (path.extname(filepath)) {\n case \".cjs\":\n if (process.env.BABEL_8_BREAKING) {\n return loadCjsDefault(filepath);\n } else {\n return loadCjsDefault(\n filepath,\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n /* fallbackToTranspiledModule */ arguments[2],\n );\n }\n case \".mjs\":\n break;\n case \".cts\":\n return loadCtsDefault(filepath);\n default:\n try {\n if (process.env.BABEL_8_BREAKING) {\n return loadCjsDefault(filepath);\n } else {\n return loadCjsDefault(\n filepath,\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n /* fallbackToTranspiledModule */ arguments[2],\n );\n }\n } catch (e) {\n if (e.code !== \"ERR_REQUIRE_ESM\") throw e;\n }\n }\n if (yield* isAsync()) {\n return yield* waitFor(loadMjsDefault(filepath));\n }\n throw new ConfigError(asyncError, filepath);\n}\n\nfunction loadCtsDefault(filepath: string) {\n const ext = \".cts\";\n const hasTsSupport = !!(\n require.extensions[\".ts\"] ||\n require.extensions[\".cts\"] ||\n require.extensions[\".mts\"]\n );\n\n let handler: NodeJS.RequireExtensions[\"\"];\n\n if (!hasTsSupport) {\n const opts: InputOptions = {\n babelrc: false,\n configFile: false,\n sourceType: \"unambiguous\",\n sourceMaps: \"inline\",\n sourceFileName: path.basename(filepath),\n presets: [\n [\n getTSPreset(filepath),\n {\n onlyRemoveTypeImports: true,\n optimizeConstEnums: true,\n ...(process.env.BABEL_8_BREAKING\n ? {}\n : { allowDeclareFields: true }),\n },\n ],\n ],\n };\n\n handler = function (m, filename) {\n // If we want to support `.ts`, `.d.ts` must be handled specially.\n if (handler && filename.endsWith(ext)) {\n try {\n // @ts-expect-error Undocumented API\n return m._compile(\n transformFileSync(filename, {\n ...opts,\n filename,\n }).code,\n filename,\n );\n } catch (error) {\n if (!hasTsSupport) {\n const packageJson = require(\"@babel/preset-typescript/package.json\");\n if (semver.lt(packageJson.version, \"7.21.4\")) {\n console.error(\n \"`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.\",\n );\n }\n }\n throw error;\n }\n }\n return require.extensions[\".js\"](m, filename);\n };\n require.extensions[ext] = handler;\n }\n try {\n const module = endHiddenCallStack(require)(filepath);\n return module?.__esModule ? module.default : module;\n } finally {\n if (!hasTsSupport) {\n if (require.extensions[ext] === handler) delete require.extensions[ext];\n handler = undefined;\n }\n }\n}\n\nfunction loadCjsDefault(filepath: string) {\n const module = endHiddenCallStack(require)(filepath);\n if (process.env.BABEL_8_BREAKING) {\n return module?.__esModule ? module.default : module;\n } else {\n return module?.__esModule\n ? module.default ||\n /* fallbackToTranspiledModule */ (arguments[1] ? module : undefined)\n : module;\n }\n}\n\nasync function loadMjsDefault(filepath: string) {\n if (!import_) {\n throw new ConfigError(\n \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n filepath,\n );\n }\n\n // import() expects URLs, not file paths.\n // https://github.com/nodejs/node/issues/31710\n const module = await endHiddenCallStack(import_)(pathToFileURL(filepath));\n return module.default;\n}\n\nfunction getTSPreset(filepath: string) {\n try {\n // eslint-disable-next-line import/no-extraneous-dependencies\n return require(\"@babel/preset-typescript\");\n } catch (error) {\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n let message =\n \"You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!\";\n\n if (!process.env.BABEL_8_BREAKING) {\n if (process.versions.pnp) {\n // Using Yarn PnP, which doesn't allow requiring packages that are not\n // explicitly specified as dependencies.\n message += `\nIf you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\\t\"@babel/core@*\":\n\\t\\tpeerDependencies:\n\\t\\t\\t\"@babel/preset-typescript\": \"*\"\n`;\n }\n }\n\n throw new ConfigError(message, filepath);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAAAC,MAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAC,KAAA;EAAA,MAAAD,IAAA,GAAAF,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAD,IAAA;EAAA;EAAA,OAAAA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BD,OAAO,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;MACK;IACF;IAEA,MAAM,IAAInC,oBAAW,CAACmC,OAAO,EAAE9C,QAAQ,CAAC;EAC1C;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js index 51f7df35..4d2195de 100644 --- a/node_modules/@babel/core/lib/config/files/package.js +++ b/node_modules/@babel/core/lib/config/files/package.js @@ -4,32 +4,51 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.findPackageData = findPackageData; - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} var _utils = require("./utils"); - -const path = require("path"); - +var _configError = require("../../errors/config-error"); const PACKAGE_FILENAME = "package.json"; - +const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => { + let options; + try { + options = JSON.parse(content); + } catch (err) { + throw new _configError.default(`Error while parsing JSON - ${err.message}`, filepath); + } + if (!options) throw new Error(`${filepath}: No config detected`); + if (typeof options !== "object") { + throw new _configError.default(`Config returned typeof ${typeof options}`, filepath); + } + if (Array.isArray(options)) { + throw new _configError.default(`Expected config object but found array`, filepath); + } + return { + filepath, + dirname: _path().dirname(filepath), + options + }; +}); function* findPackageData(filepath) { let pkg = null; const directories = []; let isPackage = true; - let dirname = path.dirname(filepath); - - while (!pkg && path.basename(dirname) !== "node_modules") { + let dirname = _path().dirname(filepath); + while (!pkg && _path().basename(dirname) !== "node_modules") { directories.push(dirname); - pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME)); - const nextLoc = path.dirname(dirname); - + pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME)); + const nextLoc = _path().dirname(dirname); if (dirname === nextLoc) { isPackage = false; break; } - dirname = nextLoc; } - return { filepath, directories, @@ -37,30 +56,6 @@ function* findPackageData(filepath) { isPackage }; } +0 && 0; -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}`; - throw err; - } - - if (!options) throw new Error(`${filepath}: No config detected`); - - if (typeof options !== "object") { - throw new Error(`${filepath}: Config returned typeof ${typeof options}`); - } - - if (Array.isArray(options)) { - throw new Error(`${filepath}: Expected config object but found array`); - } - - return { - filepath, - dirname: path.dirname(filepath), - options - }; -}); \ No newline at end of file +//# sourceMappingURL=package.js.map diff --git a/node_modules/@babel/core/lib/config/files/package.js.map b/node_modules/@babel/core/lib/config/files/package.js.map new file mode 100644 index 00000000..a3b15f94 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/package.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","_utils","_configError","PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils\";\n\nimport type { ConfigFile, FilePackageData } from \"./types\";\n\nimport ConfigError from \"../../errors/config-error\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAIA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,iBAAiB,GAAG,IAAAC,0BAAmB,EAC3C,CAACC,QAAQ,EAAEC,OAAO,KAAiB;EACjC,IAAIC,OAAO;EACX,IAAI;IACFA,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAY;EAC1C,CAAC,CAAC,OAAOI,GAAG,EAAE;IACZ,MAAM,IAAIC,oBAAW,CAClB,8BAA6BD,GAAG,CAACE,OAAQ,EAAC,EAC3CP,QACF,CAAC;EACH;EAEA,IAAI,CAACE,OAAO,EAAE,MAAM,IAAIM,KAAK,CAAE,GAAER,QAAS,sBAAqB,CAAC;EAEhE,IAAI,OAAOE,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAM,IAAII,oBAAW,CAClB,0BAAyB,OAAOJ,OAAQ,EAAC,EAC1CF,QACF,CAAC;EACH;EACA,IAAIS,KAAK,CAACC,OAAO,CAACR,OAAO,CAAC,EAAE;IAC1B,MAAM,IAAII,oBAAW,CAAE,wCAAuC,EAAEN,QAAQ,CAAC;EAC3E;EAEA,OAAO;IACLA,QAAQ;IACRW,OAAO,EAAEC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;IAC/BE;EACF,CAAC;AACH,CACF,CAAC;AAOM,UAAUW,eAAeA,CAACb,QAAgB,EAA4B;EAC3E,IAAIc,GAAG,GAAG,IAAI;EACd,MAAMC,WAAW,GAAG,EAAE;EACtB,IAAIC,SAAS,GAAG,IAAI;EAEpB,IAAIL,OAAO,GAAGC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;EACpC,OAAO,CAACc,GAAG,IAAIF,MAAGA,CAAC,CAACK,QAAQ,CAACN,OAAO,CAAC,KAAK,cAAc,EAAE;IACxDI,WAAW,CAACG,IAAI,CAACP,OAAO,CAAC;IAEzBG,GAAG,GAAG,OAAOhB,iBAAiB,CAACc,MAAGA,CAAC,CAACO,IAAI,CAACR,OAAO,EAAEd,gBAAgB,CAAC,CAAC;IAEpE,MAAMuB,OAAO,GAAGR,MAAGA,CAAC,CAACD,OAAO,CAACA,OAAO,CAAC;IACrC,IAAIA,OAAO,KAAKS,OAAO,EAAE;MACvBJ,SAAS,GAAG,KAAK;MACjB;IACF;IACAL,OAAO,GAAGS,OAAO;EACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC"} \ 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 22d92e14..22d6facb 100644 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ b/node_modules/@babel/core/lib/config/files/plugins.js @@ -3,30 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolvePlugin = resolvePlugin; -exports.resolvePreset = resolvePreset; exports.loadPlugin = loadPlugin; exports.loadPreset = loadPreset; - -var _moduleTypes = _interopRequireDefault(require("./module-types")); - -function _module() { - const data = require("module"); - - _module = function () { +exports.resolvePreset = exports.resolvePlugin = void 0; +function _debug() { + const data = require("debug"); + _debug = function () { return data; }; - return data; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const buildDebug = require("debug"); - -const path = require("path"); - -const debug = buildDebug("babel:config:loading:files:plugins"); +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +var _async = require("../../gensync-utils/async"); +var _moduleTypes = require("./module-types"); +function _url() { + const data = require("url"); + _url = function () { + return data; + }; + return data; +} +var _importMetaResolve = require("./import-meta-resolve"); +const debug = _debug()("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-)/; @@ -35,22 +39,12 @@ 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); -} - -function resolvePreset(name, dirname) { - return resolveStandardizedName("preset", name, dirname); -} - +const resolvePlugin = resolveStandardizedName.bind(null, "plugin"); +exports.resolvePlugin = resolvePlugin; +const resolvePreset = resolveStandardizedName.bind(null, "preset"); +exports.resolvePreset = resolvePreset; function* loadPlugin(name, dirname) { - const filepath = resolvePlugin(name, dirname); - - if (!filepath) { - throw new Error(`Plugin ${name} not found relative to ${dirname}`); - } - + const filepath = resolvePlugin(name, dirname, yield* (0, _async.isAsync)()); const value = yield* requireModule("plugin", filepath); debug("Loaded plugin %o from %o.", name, dirname); return { @@ -58,14 +52,8 @@ function* loadPlugin(name, dirname) { value }; } - function* loadPreset(name, dirname) { - const filepath = resolvePreset(name, dirname); - - if (!filepath) { - throw new Error(`Preset ${name} not found relative to ${dirname}`); - } - + const filepath = resolvePreset(name, dirname, yield* (0, _async.isAsync)()); const value = yield* requireModule("preset", filepath); debug("Loaded preset %o from %o.", name, dirname); return { @@ -73,119 +61,132 @@ function* loadPreset(name, dirname) { value }; } - function standardizeName(type, name) { - if (path.isAbsolute(name)) return name; + if (_path().isAbsolute(name)) return name; 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 = process.cwd()) { +function* resolveAlternativesHelper(type, name) { const standardizedName = standardizeName(type, name); - + const { + error, + value + } = yield standardizedName; + if (!error) return value; + if (error.code !== "MODULE_NOT_FOUND") throw error; + if (standardizedName !== name && !(yield name).error) { + error.message += `\n- If you want to resolve "${name}", use "module:${name}"`; + } + if (!(yield standardizeName(type, "@babel/" + name)).error) { + error.message += `\n- Did you mean "@babel/${name}"?`; + } + const oppositeType = type === "preset" ? "plugin" : "preset"; + if (!(yield standardizeName(oppositeType, name)).error) { + error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; + } + throw error; +} +function tryRequireResolve(id, dirname) { try { - return (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(standardizedName, { - paths: [dirname] - }); - } catch (e) { - if (e.code !== "MODULE_NOT_FOUND") throw e; - - if (standardizedName !== name) { - let resolvedOriginal = false; - - try { - (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { + if (dirname) { + return { + error: null, + value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { paths: [b] }, M = require("module")) => { let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - if (f) return f; f = new Error(`Cannot resolve module '${r}'`); f.code = "MODULE_NOT_FOUND"; throw f; - })(name, { + })(id, { paths: [dirname] - }); - resolvedOriginal = true; - } catch (_unused) {} - - if (resolvedOriginal) { - e.message += `\n- If you want to resolve "${name}", use "module:${name}"`; - } - } - - let resolvedBabel = false; - - try { - (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(standardizeName(type, "@babel/" + name), { - paths: [dirname] - }); - resolvedBabel = true; - } catch (_unused2) {} - - if (resolvedBabel) { - e.message += `\n- Did you mean "@babel/${name}"?`; + }) + }; + } else { + return { + error: null, + value: require.resolve(id) + }; } - - let resolvedOppositeType = false; - const oppositeType = type === "preset" ? "plugin" : "preset"; - + } catch (error) { + return { + error, + value: null + }; + } +} +function tryImportMetaResolve(id, options) { + try { + return { + error: null, + value: (0, _importMetaResolve.default)(id, options) + }; + } catch (error) { + return { + error, + value: null + }; + } +} +function resolveStandardizedNameForRequire(type, name, dirname) { + const it = resolveAlternativesHelper(type, name); + let res = it.next(); + while (!res.done) { + res = it.next(tryRequireResolve(res.value, dirname)); + } + return res.value; +} +function resolveStandardizedNameForImport(type, name, dirname) { + const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href; + const it = resolveAlternativesHelper(type, name); + let res = it.next(); + while (!res.done) { + res = it.next(tryImportMetaResolve(res.value, parentUrl)); + } + return (0, _url().fileURLToPath)(res.value); +} +function resolveStandardizedName(type, name, dirname, resolveESM) { + if (!_moduleTypes.supportsESM || !resolveESM) { + return resolveStandardizedNameForRequire(type, name, dirname); + } + try { + return resolveStandardizedNameForImport(type, name, dirname); + } catch (e) { try { - (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(standardizeName(oppositeType, name), { - paths: [dirname] - }); - resolvedOppositeType = true; - } catch (_unused3) {} - - if (resolvedOppositeType) { - e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; + return resolveStandardizedNameForRequire(type, name, dirname); + } catch (e2) { + if (e.type === "MODULE_NOT_FOUND") throw e; + if (e2.type === "MODULE_NOT_FOUND") throw e2; + throw e; } - - throw e; } } - -const LOADING_MODULES = new Set(); - +{ + var 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.'); + { + if (!(yield* (0, _async.isAsync)()) && 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.'); + } } - try { - LOADING_MODULES.add(name); - return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.", true); + { + LOADING_MODULES.add(name); + } + { + return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.", true); + } } catch (err) { err.message = `[BABEL]: ${err.message} (While processing: ${name})`; throw err; } finally { - LOADING_MODULES.delete(name); + { + LOADING_MODULES.delete(name); + } } -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=plugins.js.map diff --git a/node_modules/@babel/core/lib/config/files/plugins.js.map b/node_modules/@babel/core/lib/config/files/plugins.js.map new file mode 100644 index 00000000..817ff87b --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/plugins.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_debug","data","require","_path","_async","_moduleTypes","_url","_importMetaResolve","debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","resolveStandardizedName","bind","exports","resolvePreset","loadPlugin","name","dirname","filepath","isAsync","value","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","error","code","message","oppositeType","tryRequireResolve","id","v","w","split","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","done","resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","resolveESM","supportsESM","e","e2","LOADING_MODULES","Set","has","add","loadCodeDefault","err","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async\";\nimport loadCodeDefault, { supportsESM } from \"./module-types\";\nimport { fileURLToPath, pathToFileURL } from \"url\";\n\nimport importMetaResolve from \"./import-meta-resolve\";\n\nimport { createRequire } from \"module\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport const resolvePlugin = resolveStandardizedName.bind(null, \"plugin\");\nexport const resolvePreset = resolveStandardizedName.bind(null, \"preset\");\n\nexport function* loadPlugin(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = resolvePlugin(name, dirname, yield* isAsync());\n\n const value = yield* requireModule(\"plugin\", filepath);\n debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nexport function* loadPreset(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const filepath = resolvePreset(name, dirname, yield* isAsync());\n\n const value = yield* requireModule(\"preset\", filepath);\n\n debug(\"Loaded preset %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n // Let absolute and relative paths through.\n if (path.isAbsolute(name)) return name;\n\n const isPreset = type === \"preset\";\n\n return (\n name\n // foo -> babel-preset-foo\n .replace(\n isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n `babel-${type}-`,\n )\n // @babel/es2015 -> @babel/preset-es2015\n .replace(\n isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n `$1${type}-`,\n )\n // @foo/mypreset -> @foo/babel-preset-mypreset\n .replace(\n isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n `$1babel-${type}-`,\n )\n // @foo -> @foo/babel-preset\n .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n // module:mypreset -> mypreset\n .replace(EXACT_RE, \"\")\n );\n}\n\ntype Result = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n type: \"plugin\" | \"preset\",\n name: string,\n): Iterator> {\n const standardizedName = standardizeName(type, name);\n const { error, value } = yield standardizedName;\n if (!error) return value;\n\n // @ts-expect-error code may not index error\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n if (standardizedName !== name && !(yield name).error) {\n error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n }\n\n if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n }\n\n const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n if (!(yield standardizeName(oppositeType, name)).error) {\n error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n }\n\n throw error;\n}\n\nfunction tryRequireResolve(\n id: string,\n dirname: string | undefined,\n): Result {\n try {\n if (dirname) {\n return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n } else {\n return { error: null, value: require.resolve(id) };\n }\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction tryImportMetaResolve(\n id: Parameters[0],\n options: Parameters[1],\n): Result {\n try {\n return { error: null, value: importMetaResolve(id, options) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction resolveStandardizedNameForRequire(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryRequireResolve(res.value, dirname));\n }\n return res.value;\n}\nfunction resolveStandardizedNameForImport(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const parentUrl = pathToFileURL(\n path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n ).href;\n\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryImportMetaResolve(res.value, parentUrl));\n }\n return fileURLToPath(res.value);\n}\n\nfunction resolveStandardizedName(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n resolveESM: boolean,\n) {\n if (!supportsESM || !resolveESM) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n }\n\n try {\n return resolveStandardizedNameForImport(type, name, dirname);\n } catch (e) {\n try {\n return resolveStandardizedNameForRequire(type, name, dirname);\n } catch (e2) {\n if (e.type === \"MODULE_NOT_FOUND\") throw e;\n if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n throw e;\n }\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var LOADING_MODULES = new Set();\n}\nfunction* requireModule(type: string, name: string): Handler {\n if (!process.env.BABEL_8_BREAKING) {\n if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n throw new Error(\n `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n 'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n );\n }\n }\n\n try {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.add(name);\n }\n\n if (process.env.BABEL_8_BREAKING) {\n return yield* loadCodeDefault(\n name,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously.\",\n );\n } else {\n return yield* loadCodeDefault(\n name,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously.\",\n // For backward compatibility, we need to support malformed presets\n // defined as separate named exports rather than a single default\n // export.\n // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n // @ts-ignore(Babel 7 vs Babel 8) This param has been removed\n true,\n );\n }\n } catch (err) {\n err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n throw err;\n } finally {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.delete(name);\n }\n }\n}\n"],"mappings":";;;;;;;;AAIA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,SAAAI,KAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,kBAAA,GAAAL,OAAA;AAKA,MAAMM,KAAK,GAAGC,OAASA,CAAC,CAAC,oCAAoC,CAAC;AAE9D,MAAMC,QAAQ,GAAG,UAAU;AAC3B,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,mBAAmB,GAAG,gCAAgC;AAC5D,MAAMC,mBAAmB,GAAG,gCAAgC;AAC5D,MAAMC,mBAAmB,GACvB,+DAA+D;AACjE,MAAMC,mBAAmB,GACvB,+DAA+D;AACjE,MAAMC,oBAAoB,GAAG,sBAAsB;AAE5C,MAAMC,aAAa,GAAGC,uBAAuB,CAACC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAACC,OAAA,CAAAH,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AEC,OAAO,CAAC;IAC/D,CAAC,CAAC,OAAOqD,EAAE,EAAE;MACX,IAAID,CAAC,CAAC7C,IAAI,KAAK,kBAAkB,EAAE,MAAM6C,CAAC;MAC1C,IAAIC,EAAE,CAAC9C,IAAI,KAAK,kBAAkB,EAAE,MAAM8C,EAAE;MAC5C,MAAMD,CAAC;IACT;EACF;AACF;AAEmC;EAEjC,IAAIE,eAAe,GAAG,IAAIC,GAAG,CAAC,CAAC;AACjC;AACA,UAAUnD,aAAaA,CAACG,IAAY,EAAER,IAAY,EAAoB;EACjC;IACjC,IAAI,EAAE,OAAO,IAAAG,cAAO,EAAC,CAAC,CAAC,IAAIoD,eAAe,CAACE,GAAG,CAACzD,IAAI,CAAC,EAAE;MACpD,MAAM,IAAIoC,KAAK,CACZ,aAAY5B,IAAK,6BAA4BR,IAAK,gCAA+B,GAChF,sFAAsF,GACtF,qFACJ,CAAC;IACH;EACF;EAEA,IAAI;IACiC;MACjCuD,eAAe,CAACG,GAAG,CAAC1D,IAAI,CAAC;IAC3B;IAQO;MACL,OAAO,OAAO,IAAA2D,oBAAe,EAC3B3D,IAAI,EACH,qDAAoDQ,IAAK,IAAG,GAC3D,4DAA4D,EAM9D,IACF,CAAC;IACH;EACF,CAAC,CAAC,OAAOoD,GAAG,EAAE;IACZA,GAAG,CAAC3C,OAAO,GAAI,YAAW2C,GAAG,CAAC3C,OAAQ,uBAAsBjB,IAAK,GAAE;IACnE,MAAM4D,GAAG;EACX,CAAC,SAAS;IAC2B;MACjCL,eAAe,CAACM,MAAM,CAAC7D,IAAI,CAAC;IAC9B;EACF;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/types.js b/node_modules/@babel/core/lib/config/files/types.js index e69de29b..c03b5a6f 100644 --- a/node_modules/@babel/core/lib/config/files/types.js +++ b/node_modules/@babel/core/lib/config/files/types.js @@ -0,0 +1,3 @@ +0 && 0; + +//# sourceMappingURL=types.js.map diff --git a/node_modules/@babel/core/lib/config/files/types.js.map b/node_modules/@babel/core/lib/config/files/types.js.map new file mode 100644 index 00000000..107e58ce --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":["../../../src/config/files/types.ts"],"sourcesContent":["import type { InputOptions } from \"..\";\n\nexport type ConfigFile = {\n filepath: string;\n dirname: string;\n options: InputOptions & { babel?: unknown };\n};\n\nexport type IgnoreFile = {\n filepath: string;\n dirname: string;\n ignore: Array;\n};\n\nexport type RelativeConfig = {\n // The actual config, either from package.json#babel, .babelrc, or\n // .babelrc.js, if there was one.\n config: ConfigFile | null;\n // The .babelignore, if there was one.\n ignore: IgnoreFile | null;\n};\n\nexport type FilePackageData = {\n // The file in the package.\n filepath: string;\n // Any ancestor directories of the file that are within the package.\n directories: Array;\n // The contents of the package.json. May not be found if the package just\n // terminated at a node_modules folder without finding one.\n pkg: ConfigFile | null;\n // True if a package.json or node_modules folder was found while traversing\n // the directory structure.\n isPackage: boolean;\n};\n"],"mappings":""} \ 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 e4f2e005..1c4ccbf0 100644 --- a/node_modules/@babel/core/lib/config/files/utils.js +++ b/node_modules/@babel/core/lib/config/files/utils.js @@ -4,35 +4,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.makeStaticFileCache = makeStaticFileCache; - var _caching = require("../caching"); - -var fs = _interopRequireWildcard(require("../../gensync-utils/fs")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const nodeFs = require("fs"); - +var fs = require("../../gensync-utils/fs"); +function _fs2() { + const data = require("fs"); + _fs2 = function () { + return data; + }; + return data; +} function makeStaticFileCache(fn) { return (0, _caching.makeStrongCache)(function* (filepath, cache) { const cached = cache.invalidate(() => fileMtime(filepath)); - if (cached === null) { return null; } - return fn(filepath, yield* fs.readFile(filepath, "utf8")); }); } - function fileMtime(filepath) { + if (!_fs2().existsSync(filepath)) return null; try { - return +nodeFs.statSync(filepath).mtime; + return +_fs2().statSync(filepath).mtime; } catch (e) { if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e; } - return null; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=utils.js.map diff --git a/node_modules/@babel/core/lib/config/files/utils.js.map b/node_modules/@babel/core/lib/config/files/utils.js.map new file mode 100644 index 00000000..ab76d663 --- /dev/null +++ b/node_modules/@babel/core/lib/config/files/utils.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_caching","require","fs","_fs2","data","makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching\";\nimport type { CacheConfigurator } from \"../caching\";\nimport * as fs from \"../../gensync-utils/fs\";\nimport nodeFs from \"fs\";\n\nexport function makeStaticFileCache(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator,\n ): Handler {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAD,OAAA;AACA,SAAAE,KAAA;EAAA,MAAAC,IAAA,GAAAH,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASC,mBAAmBA,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAON,EAAE,CAACW,QAAQ,CAACL,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAASA,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACM,KAAKA,CAAC,CAACC,UAAU,CAACP,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACM,KAAKA,CAAC,CAACE,QAAQ,CAACR,QAAQ,CAAC,CAACS,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js index ab5e99e8..4a570adf 100644 --- a/node_modules/@babel/core/lib/config/full.js +++ b/node_modules/@babel/core/lib/config/full.js @@ -4,129 +4,99 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} var _async = require("../gensync-utils/async"); - var _util = require("./util"); - -var context = _interopRequireWildcard(require("../index")); - -var _plugin = _interopRequireDefault(require("./plugin")); - +var context = require("../index"); +var _plugin = require("./plugin"); var _item = require("./item"); - var _configChain = require("./config-chain"); - +var _deepArray = require("./helpers/deep-array"); function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - + const data = require("@babel/traverse"); _traverse = function () { return data; }; - return data; } - var _caching = require("./caching"); - var _options = require("./validation/options"); - var _plugins = require("./validation/plugins"); - var _configApi = require("./helpers/config-api"); - -var _partial = _interopRequireDefault(require("./partial")); - -var Context = _interopRequireWildcard(require("./cache-contexts")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const gensync = require("gensync"); - -var _default = gensync(function* loadFullConfig(inputOpts) { - var _options$assumptions; - +var _partial = require("./partial"); +var _configError = require("../errors/config-error"); +var _default = _gensync()(function* loadFullConfig(inputOpts) { + var _opts$assumptions; const result = yield* (0, _partial.default)(inputOpts); - if (!result) { return null; } - const { options, context, fileHandling } = result; - if (fileHandling === "ignored") { return null; } - const optionDefaults = {}; const { plugins, presets } = options; - if (!plugins || !presets) { throw new Error("Assertion failure - plugins and presets exist"); } - - const pluginContext = Object.assign({}, context, { - targets: options.targets, - assumptions: (_options$assumptions = options.assumptions) != null ? _options$assumptions : {} + const presetContext = Object.assign({}, context, { + targets: options.targets }); - const toDescriptor = item => { const desc = (0, _item.getItemDescriptor)(item); - if (!desc) { throw new Error("Assertion failure - must be config item"); } - return desc; }; - const presetsDescriptors = presets.map(toDescriptor); const initialPluginsDescriptors = plugins.map(toDescriptor); const pluginDescriptorsByPass = [[]]; const passes = []; + const externalDependencies = []; const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) { const presets = []; - for (let i = 0; i < rawPresets.length; i++) { const descriptor = rawPresets[i]; - if (descriptor.options !== false) { try { - if (descriptor.ownPass) { - presets.push({ - preset: yield* loadPresetDescriptor(descriptor, pluginContext), - pass: [] - }); - } else { - presets.unshift({ - preset: yield* loadPresetDescriptor(descriptor, pluginContext), - pass: pluginDescriptorsPass - }); - } + var preset = yield* loadPresetDescriptor(descriptor, presetContext); } catch (e) { if (e.code === "BABEL_UNKNOWN_OPTION") { (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e); } - throw e; } + externalDependencies.push(preset.externalDependencies); + if (descriptor.ownPass) { + presets.push({ + preset: preset.chain, + pass: [] + }); + } else { + presets.unshift({ + preset: preset.chain, + pass: pluginDescriptorsPass + }); + } } } - if (presets.length > 0) { pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass)); - for (const { preset, pass @@ -144,26 +114,27 @@ var _default = gensync(function* loadFullConfig(inputOpts) { if (ignored) return null; const opts = optionDefaults; (0, _util.mergeOptions)(opts, options); + const pluginContext = Object.assign({}, presetContext, { + assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {} + }); yield* enhanceError(context, function* loadPluginDescriptors() { pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors); - for (const descs of pluginDescriptorsByPass) { const pass = []; passes.push(pass); - for (let i = 0; i < descs.length; i++) { const descriptor = descs[i]; - if (descriptor.options !== false) { try { - pass.push(yield* loadPluginDescriptor(descriptor, pluginContext)); + var plugin = yield* loadPluginDescriptor(descriptor, pluginContext); } catch (e) { if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") { (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e); } - throw e; } + pass.push(plugin); + externalDependencies.push(plugin.externalDependencies); } } } @@ -175,26 +146,24 @@ var _default = gensync(function* loadFullConfig(inputOpts) { opts.passPerPreset = opts.presets.length > 0; return { options: opts, - passes: passes + passes: passes, + externalDependencies: (0, _deepArray.finalize)(externalDependencies) }; }); - exports.default = _default; - function enhanceError(context, fn) { return function* (arg1, arg2) { try { return yield* fn(arg1, arg2); } catch (e) { if (!/^\[BABEL\]/.test(e.message)) { - e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`; + var _context$filename; + e.message = `[BABEL] ${(_context$filename = context.filename) != null ? _context$filename : "unknown file"}: ${e.message}`; } - throw e; } }; } - const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({ value, options, @@ -203,68 +172,59 @@ const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* }, cache) { if (options === false) throw new Error("Assertion failure"); options = options || {}; + const externalDependencies = []; let item = value; - if (typeof value === "function") { const factory = (0, _async.maybeAsync)(value, `You appear to be using an async plugin/preset, but Babel has been called synchronously`); - const api = Object.assign({}, context, apiFactory(cache)); - + const api = Object.assign({}, context, apiFactory(cache, externalDependencies)); try { item = yield* factory(api, options, dirname); } catch (e) { if (alias) { e.message += ` (While processing: ${JSON.stringify(alias)})`; } - throw e; } } - if (!item || typeof item !== "object") { throw new Error("Plugin/Preset did not return an object."); } - if ((0, _async.isThenable)(item)) { yield* []; throw new Error(`You appear to be using a promise as a 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. ` + `As an alternative, you can prefix the promise with "await". ` + `(While processing: ${JSON.stringify(alias)})`); } - + if (externalDependencies.length > 0 && (!cache.configured() || cache.mode() === "forever")) { + let error = `A plugin/preset has external untracked dependencies ` + `(${externalDependencies[0]}), but the cache `; + if (!cache.configured()) { + error += `has not been configured to be invalidated when the external dependencies change. `; + } else { + error += ` has been configured to never be invalidated. `; + } + error += `Plugins/presets should configure their cache to be invalidated when the external ` + `dependencies change, for example using \`api.cache.invalidate(() => ` + `statSync(filepath).mtimeMs)\` or \`api.cache.never()\`\n` + `(While processing: ${JSON.stringify(alias)})`; + throw new Error(error); + } return { value: item, options, dirname, - alias + alias, + externalDependencies: (0, _deepArray.finalize)(externalDependencies) }; }); - const pluginDescriptorLoader = makeDescriptorLoader(_configApi.makePluginAPI); const presetDescriptorLoader = makeDescriptorLoader(_configApi.makePresetAPI); - -function* loadPluginDescriptor(descriptor, context) { - if (descriptor.value instanceof _plugin.default) { - if (descriptor.options) { - throw new Error("Passed options to an existing Plugin instance will not work."); - } - - return descriptor.value; - } - - return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context), context); -} - const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({ value, options, dirname, - alias + alias, + externalDependencies }, 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) { const inheritsDescriptor = { name: undefined, @@ -280,49 +240,64 @@ const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({ plugin.post = chain(inherits.post, plugin.post); plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions); plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]); + if (inherits.externalDependencies.length > 0) { + if (externalDependencies.length === 0) { + externalDependencies = inherits.externalDependencies; + } else { + externalDependencies = (0, _deepArray.finalize)([externalDependencies, inherits.externalDependencies]); + } + } } - - return new _plugin.default(plugin, options, alias); + return new _plugin.default(plugin, options, alias, externalDependencies); }); - +function* loadPluginDescriptor(descriptor, context) { + if (descriptor.value instanceof _plugin.default) { + if (descriptor.options) { + throw new Error("Passed options to an existing Plugin instance will not work."); + } + return descriptor.value; + } + return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context), context); +} +const needsFilename = val => val && typeof val !== "function"; const validateIfOptionNeedsFilename = (options, descriptor) => { - if (options.test || options.include || options.exclude) { + if (needsFilename(options.test) || needsFilename(options.include) || needsFilename(options.exclude)) { const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */"; - throw new Error([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transform(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n")); + throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n")); } }; - const validatePreset = (preset, context, descriptor) => { if (!context.filename) { const { options } = preset; validateIfOptionNeedsFilename(options, descriptor); - if (options.overrides) { options.overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor)); } } }; - -function* loadPresetDescriptor(descriptor, context) { - const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context)); - validatePreset(preset, context, descriptor); - return yield* (0, _configChain.buildPresetChain)(preset, context); -} - const instantiatePreset = (0, _caching.makeWeakCacheSync)(({ value, dirname, - alias + alias, + externalDependencies }) => { return { options: (0, _options.validate)("preset", value), alias, - dirname + dirname, + externalDependencies }; }); - +function* loadPresetDescriptor(descriptor, context) { + const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context)); + validatePreset(preset, context, descriptor); + return { + chain: yield* (0, _configChain.buildPresetChain)(preset, context), + externalDependencies: preset.externalDependencies + }; +} function chain(a, b) { const fns = [a, b].filter(Boolean); if (fns.length <= 1) return fns[0]; @@ -331,4 +306,7 @@ function chain(a, b) { fn.apply(this, args); } }; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=full.js.map diff --git a/node_modules/@babel/core/lib/config/full.js.map b/node_modules/@babel/core/lib/config/full.js.map new file mode 100644 index 00000000..52ec9732 --- /dev/null +++ b/node_modules/@babel/core/lib/config/full.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_async","_util","context","_plugin","_item","_configChain","_deepArray","_traverse","_caching","_options","_plugins","_configApi","_partial","_configError","_default","gensync","loadFullConfig","inputOpts","_opts$assumptions","result","loadPrivatePartialConfig","options","fileHandling","optionDefaults","plugins","presets","Error","presetContext","Object","assign","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","exports","default","fn","arg1","arg2","test","message","_context$filename","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","pre","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","include","exclude","formattedPresetName","ConfigError","join","validatePreset","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","fns","Boolean","args","apply"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { forwardAsync, maybeAsync, isThenable } from \"../gensync-utils/async\";\n\nimport { mergeOptions } from \"./util\";\nimport * as context from \"../index\";\nimport Plugin from \"./plugin\";\nimport { getItemDescriptor } from \"./item\";\nimport { buildPresetChain } from \"./config-chain\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain\";\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching\";\nimport type { CacheConfigurator } from \"./caching\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options\";\nimport type { PluginItem } from \"./validation/options\";\nimport { validatePluginObject } from \"./validation/plugins\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api\";\n\nimport loadPrivatePartialConfig from \"./partial\";\nimport type { ValidatedOptions } from \"./validation/options\";\n\nimport type * as Context from \"./cache-contexts\";\nimport ConfigError from \"../errors/config-error\";\n\ntype LoadedDescriptor = {\n value: {};\n options: {};\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options\";\n\nexport type ResolvedConfig = {\n options: any;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array;\nexport type PluginPasses = Array;\n\nexport default gensync(function* loadFullConfig(\n inputOpts: unknown,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: Array> = [[]];\n const passes: Array> = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: Array,\n pluginDescriptorsPass: Array,\n ): Handler {\n const presets: Array<{\n preset: ConfigChain | null;\n pass: Array;\n }> = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts: any = optionDefaults;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor: UnloadedDescriptor = descs[i];\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!/^\\[BABEL\\]/.test(e.message)) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: Array,\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: Array = [];\n\n let item = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // @ts-expect-error - if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chain(inherits.pre, plugin.pre);\n plugin.post = chain(inherits.post, plugin.post);\n plugin.manipulateOptions = chain(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: ValidatedOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n if (options.overrides) {\n options.overrides.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chain(\n a: undefined | ((...args: Args) => void),\n b: undefined | ((...args: Args) => void),\n) {\n const fns = [a, b].filter(Boolean);\n if (fns.length <= 1) return fns[0];\n\n return function (this: unknown, ...args: unknown[]) {\n for (const fn of fns) {\n fn.apply(this, args);\n }\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EA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,CACF,CAAC;AAKD,UAAUU,oBAAoBA,CAC5BF,UAA8B,EAC9B9C,OAA2B,EAI1B;EACD,MAAM+C,MAAM,GAAGqF,iBAAiB,CAC9B,OAAOhC,sBAAsB,CAACtD,UAAU,EAAE9C,OAAO,CACnD,CAAC;EACDiI,cAAc,CAAClF,MAAM,EAAE/C,OAAO,EAAE8C,UAAU,CAAC;EAC3C,OAAO;IACLQ,KAAK,EAAE,OAAO,IAAAiF,6BAAgB,EAACxF,MAAM,EAAE/C,OAAO,CAAC;IAC/CsC,oBAAoB,EAAES,MAAM,CAACT;EAC/B,CAAC;AACH;AAEA,SAASgB,KAAKA,CACZkF,CAAwC,EACxCC,CAAwC,EACxC;EACA,MAAMC,GAAG,GAAG,CAACF,CAAC,EAAEC,CAAC,CAAC,CAAC9E,MAAM,CAACgF,OAAO,CAAC;EAClC,IAAID,GAAG,CAAC7F,MAAM,IAAI,CAAC,EAAE,OAAO6F,GAAG,CAAC,CAAC,CAAC;EAElC,OAAO,UAAyB,GAAGE,IAAe,EAAE;IAClD,KAAK,MAAMjE,EAAE,IAAI+D,GAAG,EAAE;MACpB/D,EAAE,CAACkE,KAAK,CAAC,IAAI,EAAED,IAAI,CAAC;IACtB;EACF,CAAC;AACH;AAAC"} \ No newline at end of file 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 c97848c8..2cb8779f 100644 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js +++ b/node_modules/@babel/core/lib/config/helpers/config-api.js @@ -4,41 +4,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.makeConfigAPI = makeConfigAPI; -exports.makePresetAPI = makePresetAPI; exports.makePluginAPI = makePluginAPI; - +exports.makePresetAPI = makePresetAPI; +function _semver() { + const data = require("semver"); + _semver = function () { + return data; + }; + return data; +} var _ = require("../../"); - var _caching = require("../caching"); - -var Context = _interopRequireWildcard(require("../cache-contexts")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const semver = require("semver"); - function makeConfigAPI(cache) { const env = value => cache.using(data => { if (typeof value === "undefined") return data.envName; - if (typeof value === "function") { return (0, _caching.assertSimpleType)(value(data.envName)); } - - if (!Array.isArray(value)) value = [value]; - return value.some(entry => { + return (Array.isArray(value) ? value : [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(), @@ -48,52 +38,48 @@ function makeConfigAPI(cache) { assertVersion }; } - -function makePresetAPI(cache) { +function makePresetAPI(cache, externalDependencies) { const targets = () => JSON.parse(cache.using(data => JSON.stringify(data.targets))); - + const addExternalDependency = ref => { + externalDependencies.push(ref); + }; return Object.assign({}, makeConfigAPI(cache), { - targets + targets, + addExternalDependency }); } - -function makePluginAPI(cache) { +function makePluginAPI(cache, externalDependencies) { const assumption = name => cache.using(data => data.assumptions[name]); - - return Object.assign({}, makePresetAPI(cache), { + return Object.assign({}, makePresetAPI(cache, externalDependencies), { assumption }); } - function assertVersion(range) { if (typeof range === "number") { if (!Number.isInteger(range)) { throw new Error("Expected string or integer value."); } - range = `^${range}.0.0-0`; } - if (typeof range !== "string") { throw new Error("Expected string or integer value."); } - - if (semver.satisfies(_.version, range)) return; + ; + if (_semver().satisfies(_.version, range)) return; const limit = Error.stackTraceLimit; - if (typeof limit === "number" && limit < 25) { Error.stackTraceLimit = 25; } - 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; } - throw Object.assign(err, { code: "BABEL_VERSION_UNSUPPORTED", version: _.version, range }); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=config-api.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js.map b/node_modules/@babel/core/lib/config/helpers/config-api.js.map new file mode 100644 index 00000000..9ea10e0d --- /dev/null +++ b/node_modules/@babel/core/lib/config/helpers/config-api.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_semver","data","require","_","_caching","makeConfigAPI","cache","env","value","using","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","Object","assign","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","limit","stackTraceLimit","err","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../\";\nimport { assertSimpleType } from \"../caching\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n (): string;\n (extractor: (babelEnv: string) => T): T;\n (envVar: string): boolean;\n (envVars: Array): boolean;\n};\n\ntype CallerFactory = (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n) => SimpleType;\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (typeof value === \"undefined\") return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (cb: {\n (CallerMetadata: CallerMetadata | undefined): SimpleType;\n }) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: Array,\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n // TODO(Babel 8): Update all the version checks\n if (process.env.BABEL_8_BREAKING) {\n range += ` || ^8.0.0-0`;\n }\n\n if (semver.satisfies(coreVersion, range)) return;\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`,\n );\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,CAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AA0CO,SAASG,aAAaA,CAC3BC,KAAqC,EAC1B;EAKX,MAAMC,GAAgB,GACpBC,KAAuD,IAEvDF,KAAK,CAACG,KAAK,CAACR,IAAI,IAAI;IAClB,IAAI,OAAOO,KAAK,KAAK,WAAW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EACF,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js b/node_modules/@babel/core/lib/config/helpers/deep-array.js new file mode 100644 index 00000000..c611db20 --- /dev/null +++ b/node_modules/@babel/core/lib/config/helpers/deep-array.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.finalize = finalize; +exports.flattenToSet = flattenToSet; +function finalize(deepArr) { + return Object.freeze(deepArr); +} +function flattenToSet(arr) { + const result = new Set(); + const stack = [arr]; + while (stack.length > 0) { + for (const el of stack.pop()) { + if (Array.isArray(el)) stack.push(el);else result.add(el); + } + } + return result; +} +0 && 0; + +//# sourceMappingURL=deep-array.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js.map b/node_modules/@babel/core/lib/config/helpers/deep-array.js.map new file mode 100644 index 00000000..6dc9bea4 --- /dev/null +++ b/node_modules/@babel/core/lib/config/helpers/deep-array.js.map @@ -0,0 +1 @@ +{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray = Array>;\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = ReadonlyArray> & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;AAQO,SAASA,QAAQA,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAYA,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAI,CAAC;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,CAAC,CAAC,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAA0B,CAAC,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAO,CAAC;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC"} \ 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 e4bfdbc7..a23b80be 100644 --- a/node_modules/@babel/core/lib/config/helpers/environment.js +++ b/node_modules/@babel/core/lib/config/helpers/environment.js @@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getEnv = getEnv; - function getEnv(defaultValue = "development") { return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=environment.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js.map b/node_modules/@babel/core/lib/config/helpers/environment.js.map new file mode 100644 index 00000000..e71555c9 --- /dev/null +++ b/node_modules/@babel/core/lib/config/helpers/environment.js.map @@ -0,0 +1 @@ +{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAMA,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC"} \ 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 a9820d4e..e250d01a 100644 --- a/node_modules/@babel/core/lib/config/index.js +++ b/node_modules/@babel/core/lib/config/index.js @@ -4,41 +4,45 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.createConfigItem = createConfigItem; +exports.createConfigItemSync = exports.createConfigItemAsync = void 0; Object.defineProperty(exports, "default", { enumerable: true, get: function () { return _full.default; } }); -exports.createConfigItemAsync = exports.createConfigItemSync = exports.loadOptionsAsync = exports.loadOptionsSync = exports.loadOptions = exports.loadPartialConfigAsync = exports.loadPartialConfigSync = exports.loadPartialConfig = void 0; - -var _full = _interopRequireDefault(require("./full")); - +exports.loadPartialConfigSync = exports.loadPartialConfigAsync = exports.loadPartialConfig = exports.loadOptionsSync = exports.loadOptionsAsync = exports.loadOptions = void 0; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _full = require("./full"); var _partial = require("./partial"); - var _item = require("./item"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const gensync = require("gensync"); - -const loadOptionsRunner = gensync(function* (opts) { +const loadOptionsRunner = _gensync()(function* (opts) { var _config$options; - const config = yield* (0, _full.default)(opts); return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null; }); -const createConfigItemRunner = gensync(_item.createConfigItem); - -const maybeErrback = runner => (opts, callback) => { - if (callback === undefined && typeof opts === "function") { - callback = opts; - opts = undefined; +const createConfigItemRunner = _gensync()(_item.createConfigItem); +const maybeErrback = runner => (argOrCallback, maybeCallback) => { + let arg; + let callback; + if (maybeCallback === undefined && typeof argOrCallback === "function") { + callback = argOrCallback; + arg = undefined; + } else { + callback = maybeCallback; + arg = argOrCallback; } - - return callback ? runner.errback(opts, callback) : runner.sync(opts); + if (!callback) { + return runner.sync(arg); + } + runner.errback(arg, callback); }; - const loadPartialConfig = maybeErrback(_partial.loadPartialConfig); exports.loadPartialConfig = loadPartialConfig; const loadPartialConfigSync = _partial.loadPartialConfig.sync; @@ -55,13 +59,15 @@ const createConfigItemSync = createConfigItemRunner.sync; exports.createConfigItemSync = createConfigItemSync; const createConfigItemAsync = createConfigItemRunner.async; exports.createConfigItemAsync = createConfigItemAsync; - function createConfigItem(target, options, callback) { if (callback !== undefined) { - return createConfigItemRunner.errback(target, options, callback); + createConfigItemRunner.errback(target, options, callback); } else if (typeof options === "function") { - return createConfigItemRunner.errback(target, undefined, callback); + createConfigItemRunner.errback(target, undefined, callback); } else { return createConfigItemRunner.sync(target, options); } -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/config/index.js.map b/node_modules/@babel/core/lib/config/index.js.map new file mode 100644 index 00000000..f4dd3f37 --- /dev/null +++ b/node_modules/@babel/core/lib/config/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_full","_partial","_item","loadOptionsRunner","gensync","opts","_config$options","config","loadFullConfig","options","createConfigItemRunner","createConfigItemImpl","maybeErrback","runner","argOrCallback","maybeCallback","arg","callback","undefined","sync","errback","loadPartialConfig","loadPartialConfigRunner","exports","loadPartialConfigSync","loadPartialConfigAsync","async","loadOptions","loadOptionsSync","loadOptionsAsync","createConfigItemSync","createConfigItemAsync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler, type Callback } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full\";\n\nimport type { PluginTarget } from \"./validation/options\";\n\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api\";\nexport type { PluginObject } from \"./validation/plugins\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n CallerMetadata,\n ValidatedOptions as PresetObject,\n} from \"./validation/options\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full\";\nimport { loadPartialConfig as loadPartialConfigRunner } from \"./partial\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item\";\nimport type { ConfigItem } from \"./item\";\n\nconst loadOptionsRunner = gensync(function* (\n opts: unknown,\n): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n});\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\n\nconst maybeErrback =\n (runner: gensync.Gensync<[Arg], Return>) =>\n (argOrCallback: Arg | Callback, maybeCallback?: Callback) => {\n let arg: Arg | undefined;\n let callback: Callback;\n if (maybeCallback === undefined && typeof argOrCallback === \"function\") {\n callback = argOrCallback as Callback;\n arg = undefined;\n } else {\n callback = maybeCallback;\n arg = argOrCallback as Arg;\n }\n if (!callback) {\n return runner.sync(arg);\n }\n runner.errback(arg, callback);\n };\n\nexport const loadPartialConfig = maybeErrback(loadPartialConfigRunner);\nexport const loadPartialConfigSync = loadPartialConfigRunner.sync;\nexport const loadPartialConfigAsync = loadPartialConfigRunner.async;\n\nexport const loadOptions = maybeErrback(loadOptionsRunner);\nexport const loadOptionsSync = loadOptionsRunner.sync;\nexport const loadOptionsAsync = loadOptionsRunner.async;\n\nexport const createConfigItemSync = createConfigItemRunner.sync;\nexport const createConfigItemAsync = createConfigItemRunner.async;\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n createConfigItemRunner.errback(target, options, callback);\n } else if (typeof options === \"function\") {\n createConfigItemRunner.errback(target, undefined, callback);\n } else {\n return createConfigItemRunner.sync(target, options);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA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B,CAACI,KAAK;AAACH,OAAA,CAAAE,sBAAA,GAAAA,sBAAA;AAE7D,MAAME,WAAW,GAAGf,YAAY,CAACT,iBAAiB,CAAC;AAACoB,OAAA,CAAAI,WAAA,GAAAA,WAAA;AACpD,MAAMC,eAAe,GAAGzB,iBAAiB,CAACgB,IAAI;AAACI,OAAA,CAAAK,eAAA,GAAAA,eAAA;AAC/C,MAAMC,gBAAgB,GAAG1B,iBAAiB,CAACuB,KAAK;AAACH,OAAA,CAAAM,gBAAA,GAAAA,gBAAA;AAEjD,MAAMC,oBAAoB,GAAGpB,sBAAsB,CAACS,IAAI;AAACI,OAAA,CAAAO,oBAAA,GAAAA,oBAAA;AACzD,MAAMC,qBAAqB,GAAGrB,sBAAsB,CAACgB,KAAK;AAACH,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA;AAC3D,SAASC,gBAAgBA,CAC9BC,MAAoB,EACpBxB,OAAmD,EACnDQ,QAAuD,EACvD;EACA,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1BR,sBAAsB,CAACU,OAAO,CAACa,MAAM,EAAExB,OAAO,EAAEQ,QAAQ,CAAC;EAC3D,CAAC,MAAM,IAAI,OAAOR,OAAO,KAAK,UAAU,EAAE;IACxCC,sBAAsB,CAACU,OAAO,CAACa,MAAM,EAAEf,SAAS,EAAED,QAAQ,CAAC;EAC7D,CAAC,MAAM;IACL,OAAOP,sBAAsB,CAACS,IAAI,CAACc,MAAM,EAAExB,OAAO,CAAC;EACrD;AACF;AAAC"} \ 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 b82162a3..f619287f 100644 --- a/node_modules/@babel/core/lib/config/item.js +++ b/node_modules/@babel/core/lib/config/item.js @@ -3,39 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.createItemFromDescriptor = createItemFromDescriptor; exports.createConfigItem = createConfigItem; +exports.createItemFromDescriptor = createItemFromDescriptor; exports.getItemDescriptor = getItemDescriptor; - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} var _configDescriptors = require("./config-descriptors"); - -const path = require("path"); - function createItemFromDescriptor(desc) { return new ConfigItem(desc); } - function* createConfigItem(value, { dirname = ".", type } = {}) { - const descriptor = yield* (0, _configDescriptors.createDescriptor)(value, path.resolve(dirname), { + const descriptor = yield* (0, _configDescriptors.createDescriptor)(value, _path().resolve(dirname), { type, alias: "programmatic item" }); return createItemFromDescriptor(descriptor); } - +const CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem"); function getItemDescriptor(item) { if (item != null && item[CONFIG_ITEM_BRAND]) { return item._descriptor; } - return undefined; } - -const CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem"); - class ConfigItem { constructor(descriptor) { this._descriptor = void 0; @@ -62,7 +60,8 @@ class ConfigItem { } : undefined; Object.freeze(this); } - } +Object.freeze(ConfigItem.prototype); +0 && 0; -Object.freeze(ConfigItem.prototype); \ No newline at end of file +//# sourceMappingURL=item.js.map diff --git a/node_modules/@babel/core/lib/config/item.js.map b/node_modules/@babel/core/lib/config/item.js.map new file mode 100644 index 00000000..d27d8b49 --- /dev/null +++ b/node_modules/@babel/core/lib/config/item.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","_configDescriptors","createItemFromDescriptor","desc","ConfigItem","createConfigItem","value","dirname","type","descriptor","createDescriptor","path","resolve","alias","CONFIG_ITEM_BRAND","Symbol","for","getItemDescriptor","item","_descriptor","undefined","constructor","options","name","file","Object","defineProperty","enumerable","request","resolved","freeze","prototype"],"sources":["../../src/config/item.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport type { PluginTarget, PluginOptions } from \"./validation/options\";\n\nimport path from \"path\";\nimport { createDescriptor } from \"./config-descriptors\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors\";\n\nexport function createItemFromDescriptor(desc: UnloadedDescriptor): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value:\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void],\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(item: unknown): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 9): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: {} | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: {} | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n"],"mappings":";;;;;;;;AAGA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,kBAAA,GAAAD,OAAA;AAIO,SAASE,wBAAwBA,CAACC,IAAwB,EAAc;EAC7E,OAAO,IAAIC,UAAU,CAACD,IAAI,CAAC;AAC7B;AAQO,UAAUE,gBAAgBA,CAC/BC,KAGgD,EAChD;EACEC,OAAO,GAAG,GAAG;EACbC;AAIF,CAAC,GAAG,CAAC,CAAC,EACe;EACrB,MAAMC,UAAU,GAAG,OAAO,IAAAC,mCAAgB,EAACJ,KAAK,EAAEK,MAAGA,CAAC,CAACC,OAAO,CAACL,OAAO,CAAC,EAAE;IACvEC,IAAI;IACJK,KAAK,EAAE;EACT,CAAC,CAAC;EAEF,OAAOX,wBAAwB,CAACO,UAAU,CAAC;AAC7C;AAEA,MAAMK,iBAAiB,GAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;AAE3D,SAASC,iBAAiBA,CAACC,IAAa,EAA6B;EAC1E,IAAKA,IAAI,YAAJA,IAAI,CAAWJ,iBAAiB,CAAC,EAAE;IACtC,OAAQI,IAAI,CAAgBC,WAAW;EACzC;EAEA,OAAOC,SAAS;AAClB;AAYA,MAAMhB,UAAU,CAAC;EA8CfiB,WAAWA,CAACZ,UAA8B,EAAE;IAAA,KAzC5CU,WAAW;IAAA,KAMVL,iBAAiB,IAAI,IAAI;IAAA,KAK1BR,KAAK;IAAA,KAQLgB,OAAO;IAAA,KAKPf,OAAO;IAAA,KAKPgB,IAAI;IAAA,KAKJC,IAAI;IAWF,IAAI,CAACL,WAAW,GAAGV,UAAU;IAC7BgB,MAAM,CAACC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;MAAEC,UAAU,EAAE;IAAM,CAAC,CAAC;IAEjEF,MAAM,CAACC,cAAc,CAAC,IAAI,EAAEZ,iBAAiB,EAAE;MAAEa,UAAU,EAAE;IAAM,CAAC,CAAC;IAErE,IAAI,CAACrB,KAAK,GAAG,IAAI,CAACa,WAAW,CAACb,KAAK;IACnC,IAAI,CAACgB,OAAO,GAAG,IAAI,CAACH,WAAW,CAACG,OAAO;IACvC,IAAI,CAACf,OAAO,GAAG,IAAI,CAACY,WAAW,CAACZ,OAAO;IACvC,IAAI,CAACgB,IAAI,GAAG,IAAI,CAACJ,WAAW,CAACI,IAAI;IACjC,IAAI,CAACC,IAAI,GAAG,IAAI,CAACL,WAAW,CAACK,IAAI,GAC7B;MACEI,OAAO,EAAE,IAAI,CAACT,WAAW,CAACK,IAAI,CAACI,OAAO;MACtCC,QAAQ,EAAE,IAAI,CAACV,WAAW,CAACK,IAAI,CAACK;IAClC,CAAC,GACDT,SAAS;IAKbK,MAAM,CAACK,MAAM,CAAC,IAAI,CAAC;EACrB;AACF;AAEAL,MAAM,CAACK,MAAM,CAAC1B,UAAU,CAAC2B,SAAS,CAAC;AAAC"} \ 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 ee9bb2e9..443458cf 100644 --- a/node_modules/@babel/core/lib/config/partial.js +++ b/node_modules/@babel/core/lib/config/partial.js @@ -5,62 +5,56 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = loadPrivatePartialConfig; exports.loadPartialConfig = void 0; - -var _plugin = _interopRequireDefault(require("./plugin")); - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _plugin = require("./plugin"); var _util = require("./util"); - var _item = require("./item"); - var _configChain = require("./config-chain"); - var _environment = require("./helpers/environment"); - var _options = require("./validation/options"); - var _files = require("./files"); - var _resolveTargets = require("./resolve-targets"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +const _excluded = ["showIgnoredFiles"]; 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; } - -const path = require("path"); - -const gensync = require("gensync"); - -function* resolveRootMode(rootDir, rootMode) { +function resolveRootMode(rootDir, rootMode) { switch (rootMode) { case "root": return rootDir; - case "upward-optional": { - const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir); + const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); return upwardRootDir === null ? rootDir : upwardRootDir; } - case "upward": { - const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir); + 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}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), { 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"); } - const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; const { envName = (0, _environment.getEnv)(), @@ -70,9 +64,9 @@ function* loadPrivatePartialConfig(inputOpts) { caller, cloneInputAst = true } = args; - const absoluteCwd = path.resolve(cwd); - const absoluteRootDir = yield* resolveRootMode(path.resolve(absoluteCwd, rootDir), rootMode); - const filename = typeof args.filename === "string" ? path.resolve(cwd, args.filename) : undefined; + const absoluteCwd = _path().resolve(cwd); + const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode); + const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined; const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd); const context = { filename, @@ -115,19 +109,16 @@ function* loadPrivatePartialConfig(inputOpts) { files: configChain.files }; } - -const loadPartialConfig = gensync(function* (opts) { +const loadPartialConfig = _gensync()(function* (opts) { let showIgnoredFiles = false; - if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) { var _opts = opts; ({ showIgnoredFiles } = _opts); - opts = _objectWithoutPropertiesLoose(_opts, ["showIgnoredFiles"]); + opts = _objectWithoutPropertiesLoose(_opts, _excluded); _opts; } - const result = yield* loadPrivatePartialConfig(opts); if (!result) return null; const { @@ -138,11 +129,9 @@ const loadPartialConfig = gensync(function* (opts) { fileHandling, files } = result; - if (fileHandling === "ignored" && !showIgnoredFiles) { return null; } - (options.plugins || []).forEach(item => { if (item.value instanceof _plugin.default) { throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); @@ -151,7 +140,6 @@ const loadPartialConfig = gensync(function* (opts) { return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files); }); exports.loadPartialConfig = loadPartialConfig; - class PartialConfig { constructor(options, babelrc, ignore, config, fileHandling, files) { this.options = void 0; @@ -168,11 +156,11 @@ class PartialConfig { this.files = files; Object.freeze(this); } - hasFilesystemConfig() { return this.babelrc !== undefined || this.config !== undefined; } - } +Object.freeze(PartialConfig.prototype); +0 && 0; -Object.freeze(PartialConfig.prototype); \ No newline at end of file +//# sourceMappingURL=partial.js.map diff --git a/node_modules/@babel/core/lib/config/partial.js.map b/node_modules/@babel/core/lib/config/partial.js.map new file mode 100644 index 00000000..c889a28f --- /dev/null +++ b/node_modules/@babel/core/lib/config/partial.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","_gensync","_plugin","_util","_item","_configChain","_environment","_options","_files","_resolveTargets","_excluded","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","Object","keys","key","i","length","indexOf","resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","gensync","showIgnoredFiles","_opts","result","item","value","Plugin","PartialConfig","filepath","exports","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"path\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin\";\nimport { mergeOptions } from \"./util\";\nimport { createItemFromDescriptor } from \"./item\";\nimport { buildRootChain } from \"./config-chain\";\nimport type { ConfigContext, FileHandling } from \"./config-chain\";\nimport { getEnv } from \"./helpers/environment\";\nimport { validate } from \"./validation/options\";\n\nimport type {\n ValidatedOptions,\n NormalizedOptions,\n RootMode,\n} from \"./validation/options\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files\";\nimport type { ConfigFile, IgnoreFile } from \"./files\";\nimport { resolveTargets } from \"./resolve-targets\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\ntype PrivPartialConfig = {\n options: NormalizedOptions;\n context: ConfigContext;\n fileHandling: FileHandling;\n ignore: IgnoreFile | void;\n babelrc: ConfigFile | void;\n config: ConfigFile | void;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: unknown,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged: ValidatedOptions = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\ntype LoadPartialConfigOpts = {\n showIgnoredFiles?: boolean;\n};\n\nexport const loadPartialConfig = gensync(function* (\n opts?: LoadPartialConfigOpts,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n});\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | void;\n babelignore: string | void;\n config: string | void;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | void,\n ignore: string | void,\n config: string | void,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n"],"mappings":";;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAEA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAQA,IAAAQ,MAAA,GAAAR,OAAA;AAMA,IAAAS,eAAA,GAAAT,OAAA;AAAmD,MAAAU,SAAA;AAAA,SAAAC,8BAAAC,MAAA,EAAAC,QAAA,QAAAD,MAAA,yBAAAE,MAAA,WAAAC,UAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAL,MAAA,OAAAM,GAAA,EAAAC,CAAA,OAAAA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CAACG,KAAK,GAAGA,KAAK;IAIlB7D,MAAM,CAAC2E,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmBA,CAAA,EAAY;IAC7B,OAAO,IAAI,CAAC3B,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAlC,MAAM,CAAC2E,MAAM,CAACL,aAAa,CAACO,SAAS,CAAC;AAAC"} \ 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 index 30fd3009..e061f793 100644 --- a/node_modules/@babel/core/lib/config/pattern-to-regex.js +++ b/node_modules/@babel/core/lib/config/pattern-to-regex.js @@ -4,32 +4,35 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = pathToPattern; - -const path = require("path"); - -const sep = `\\${path.sep}`; +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +const sep = `\\${_path().sep}`; const endSep = `(?:${sep}|$)`; const substitution = `[^${sep}]+`; const starPat = `(?:${substitution}${sep})`; const starPatLast = `(?:${substitution}${endSep})`; const starStarPat = `${starPat}*?`; const starStarPatLast = `${starPat}*?${starPatLast}?`; - function escapeRegExp(string) { return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"); } - function pathToPattern(pattern, dirname) { - const parts = path.resolve(dirname, pattern).split(path.sep); + const parts = _path().resolve(dirname, pattern).split(_path().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 + escapeRegExp(part.slice(1)) + (last ? endSep : sep); } - return escapeRegExp(part) + (last ? endSep : sep); })].join("")); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=pattern-to-regex.js.map diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js.map b/node_modules/@babel/core/lib/config/pattern-to-regex.js.map new file mode 100644 index 00000000..6ff196b7 --- /dev/null +++ b/node_modules/@babel/core/lib/config/pattern-to-regex.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","indexOf","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.indexOf(\"*.\") === 0) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,GAAI,K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AAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CACX,CAAC;AACH;AAAC"} \ 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 9cb1656b..58dcb034 100644 --- a/node_modules/@babel/core/lib/config/plugin.js +++ b/node_modules/@babel/core/lib/config/plugin.js @@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - +var _deepArray = require("./helpers/deep-array"); class Plugin { - constructor(plugin, options, key) { + constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) { this.key = void 0; this.manipulateOptions = void 0; this.post = void 0; @@ -15,6 +15,7 @@ class Plugin { this.parserOverride = void 0; this.generatorOverride = void 0; this.options = void 0; + this.externalDependencies = void 0; this.key = plugin.name || key; this.manipulateOptions = plugin.manipulateOptions; this.post = plugin.post; @@ -23,8 +24,10 @@ class Plugin { this.parserOverride = plugin.parserOverride; this.generatorOverride = plugin.generatorOverride; this.options = options; + this.externalDependencies = externalDependencies; } - } +exports.default = Plugin; +0 && 0; -exports.default = Plugin; \ No newline at end of file +//# sourceMappingURL=plugin.js.map diff --git a/node_modules/@babel/core/lib/config/plugin.js.map b/node_modules/@babel/core/lib/config/plugin.js.map new file mode 100644 index 00000000..32cd2235 --- /dev/null +++ b/node_modules/@babel/core/lib/config/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array\";\nimport type { PluginObject } from \"./validation/plugins\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: (options: unknown, parserOpts: unknown) => void;\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: Function;\n generatorOverride?: Function;\n\n options: {};\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: {},\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAW,EACXC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/printer.js b/node_modules/@babel/core/lib/config/printer.js index 8a49ae29..3fb9ced3 100644 --- a/node_modules/@babel/core/lib/config/printer.js +++ b/node_modules/@babel/core/lib/config/printer.js @@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigPrinter = exports.ChainFormatter = void 0; - -const gensync = require("gensync"); - +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} const ChainFormatter = { Programmatic: 0, Config: 1 @@ -15,72 +19,54 @@ exports.ChainFormatter = ChainFormatter; const Formatter = { title(type, callerName, filepath) { let title = ""; - if (type === ChainFormatter.Programmatic) { title = "programmatic options"; - if (callerName) { title += " from " + callerName; } } else { title = "config " + filepath; } - return title; }, - loc(index, envName) { let loc = ""; - if (index != null) { loc += `.overrides[${index}]`; } - if (envName != null) { loc += `.env["${envName}"]`; } - return loc; }, - *optionsAndDescriptors(opt) { const content = Object.assign({}, opt.options); delete content.overrides; delete content.env; const pluginDescriptors = [...(yield* opt.plugins())]; - if (pluginDescriptors.length) { content.plugins = pluginDescriptors.map(d => descriptorToConfig(d)); } - const presetDescriptors = [...(yield* opt.presets())]; - if (presetDescriptors.length) { content.presets = [...presetDescriptors].map(d => descriptorToConfig(d)); } - return JSON.stringify(content, undefined, 2); } - }; - function descriptorToConfig(d) { var _d$file; - let name = (_d$file = d.file) == null ? void 0 : _d$file.request; - if (name == null) { if (typeof d.value === "object") { name = d.value; } else if (typeof d.value === "function") { - name = `[Function: ${d.value.toString().substr(0, 50)} ... ]`; + name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`; } } - if (name == null) { name = "[Unknown]"; } - if (d.options === undefined) { return name; } else if (d.name == null) { @@ -89,12 +75,10 @@ function descriptorToConfig(d) { return [name, d.options, d.name]; } } - class ConfigPrinter { constructor() { this._stack = []; } - configure(enabled, type, { callerName, filepath @@ -111,7 +95,6 @@ class ConfigPrinter { }); }; } - static *format(config) { let title = Formatter.title(config.type, config.callerName, config.filepath); const loc = Formatter.loc(config.index, config.envName); @@ -119,13 +102,13 @@ class ConfigPrinter { const content = yield* Formatter.optionsAndDescriptors(config.content); return `${title}\n${content}`; } - *output() { if (this._stack.length === 0) return ""; - const configs = yield* gensync.all(this._stack.map(s => ConfigPrinter.format(s))); + const configs = yield* _gensync().all(this._stack.map(s => ConfigPrinter.format(s))); return configs.join("\n\n"); } - } +exports.ConfigPrinter = ConfigPrinter; +0 && 0; -exports.ConfigPrinter = ConfigPrinter; \ No newline at end of file +//# sourceMappingURL=printer.js.map diff --git a/node_modules/@babel/core/lib/config/printer.js.map b/node_modules/@babel/core/lib/config/printer.js.map new file mode 100644 index 00000000..fedaf4c2 --- /dev/null +++ b/node_modules/@babel/core/lib/config/printer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","ChainFormatter","Programmatic","Config","exports","Formatter","title","type","callerName","filepath","loc","index","envName","optionsAndDescriptors","opt","content","Object","assign","options","overrides","env","pluginDescriptors","plugins","length","map","d","descriptorToConfig","presetDescriptors","presets","JSON","stringify","undefined","_d$file","name","file","request","value","toString","slice","ConfigPrinter","constructor","_stack","configure","enabled","push","format","config","output","configs","gensync","all","s","join"],"sources":["../../src/config/printer.ts"],"sourcesContent":["import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): string | {} | Array {\n let name = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: Array = [];\n configure(\n enabled: boolean,\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUO,MAAME,cAAc,GAAG;EAC5BC,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE;AACV,CAAC;AAACC,OAAA,CAAAH,cAAA,GAAAA,cAAA;AAWF,MAAMI,SAAS,GAAG;EAChBC,KAAKA,CACHC,IAA0D,EAC1DC,UAA0B,EAC1BC,QAAwB,EAChB;IACR,IAAIH,KAAK,GAAG,EAAE;IACd,IAAIC,IAAI,KAAKN,cAAc,CAACC,YAAY,EAAE;MACxCI,KAAK,GAAG,sBAAsB;MAC9B,IAAIE,UAAU,EAAE;QACdF,KAAK,IAAI,QAAQ,GAAGE,UAAU;MAChC;IACF,CAAC,MAAM;MACLF,KAAK,GAAG,SAAS,GAAGG,QAAQ;IAC9B;IACA,OAAOH,KAAK;EACd,CAAC;EACDI,GAAGA,CAACC,KAAqB,EAAEC,OAAuB,EAAU;IAC1D,IAAIF,GAAG,GAAG,EAAE;IACZ,IAAIC,KAAK,IAAI,IAAI,EAAE;MACjBD,GAAG,IAAK,cAAaC,KAAM,GAAE;IAC/B;IACA,IAAIC,OAAO,IAAI,IAAI,EAAE;MACnBF,GAAG,IAAK,SAAQE,OAAQ,IAAG;IAC7B;IACA,OAAOF,GAAG;EACZ,CAAC;EAED,CAACG,qBAAqBA,CAACC,GAA0B,EAAE;IAC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C;EAC/B;EAEA,CAACgC,MAAMA,CAAA,EAAoB;IACzB,IAAI,IAAI,CAACN,MAAM,CAAClB,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;IACvC,MAAMyB,OAAO,GAAG,OAAOC,SAAMA,CAAC,CAACC,GAAG,CAChC,IAAI,CAACT,MAAM,CAACjB,GAAG,CAAC2B,CAAC,IAAIZ,aAAa,CAACM,MAAM,CAACM,CAAC,CAAC,CAC9C,CAAC;IACD,OAAOH,OAAO,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;AACF;AAAChD,OAAA,CAAAmC,aAAA,GAAAA,aAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js b/node_modules/@babel/core/lib/config/resolve-targets-browser.js index d733ad4c..3fdbd882 100644 --- a/node_modules/@babel/core/lib/config/resolve-targets-browser.js +++ b/node_modules/@babel/core/lib/config/resolve-targets-browser.js @@ -5,42 +5,37 @@ Object.defineProperty(exports, "__esModule", { }); exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile; exports.resolveTargets = resolveTargets; - function _helperCompilationTargets() { - const data = _interopRequireDefault(require("@babel/helper-compilation-targets")); - + const data = require("@babel/helper-compilation-targets"); _helperCompilationTargets = function () { return data; }; - return data; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) { return undefined; } - function resolveTargets(options, root) { - let { - targets - } = options; - - if (typeof targets === "string" || Array.isArray(targets)) { + const optTargets = options.targets; + let targets; + if (typeof optTargets === "string" || Array.isArray(optTargets)) { targets = { - browsers: targets + browsers: optTargets }; + } else if (optTargets) { + if ("esmodules" in optTargets) { + targets = Object.assign({}, optTargets, { + esmodules: "intersect" + }); + } else { + targets = optTargets; + } } - - if (targets && targets.esmodules) { - targets = Object.assign({}, targets, { - esmodules: "intersect" - }); - } - return (0, _helperCompilationTargets().default)(targets, { ignoreBrowserslistConfig: true, browserslistEnv: options.browserslistEnv }); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=resolve-targets-browser.js.map diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map b/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map new file mode 100644 index 00000000..bbae8a20 --- /dev/null +++ b/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_helperCompilationTargets","data","require","resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["import type { ValidatedOptions } from \"./validation/options\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AACA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,yBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMO,SAASE,6BAA6BA,CAE3CC,sBAA8B,EAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAcA,CAC5BC,OAAyB,EAEzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAQ,mCAAU,EAACP,OAAO,EAAE;IACzBQ,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js b/node_modules/@babel/core/lib/config/resolve-targets.js index 5c2d8aca..1fc539a7 100644 --- a/node_modules/@babel/core/lib/config/resolve-targets.js +++ b/node_modules/@babel/core/lib/config/resolve-targets.js @@ -5,60 +5,57 @@ Object.defineProperty(exports, "__esModule", { }); exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile; exports.resolveTargets = resolveTargets; - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} function _helperCompilationTargets() { - const data = _interopRequireDefault(require("@babel/helper-compilation-targets")); - + const data = require("@babel/helper-compilation-targets"); _helperCompilationTargets = function () { return data; }; - return data; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - ({}); - -const path = require("path"); - function resolveBrowserslistConfigFile(browserslistConfigFile, configFileDir) { - return path.resolve(configFileDir, browserslistConfigFile); + return _path().resolve(configFileDir, browserslistConfigFile); } - function resolveTargets(options, root) { - let { - targets - } = options; - - if (typeof targets === "string" || Array.isArray(targets)) { + const optTargets = options.targets; + let targets; + if (typeof optTargets === "string" || Array.isArray(optTargets)) { targets = { - browsers: targets + browsers: optTargets }; + } else if (optTargets) { + if ("esmodules" in optTargets) { + targets = Object.assign({}, optTargets, { + esmodules: "intersect" + }); + } else { + targets = optTargets; + } } - - if (targets && targets.esmodules) { - targets = Object.assign({}, targets, { - esmodules: "intersect" - }); - } - const { browserslistConfigFile } = options; let configFile; let ignoreBrowserslistConfig = false; - if (typeof browserslistConfigFile === "string") { configFile = browserslistConfigFile; } else { ignoreBrowserslistConfig = browserslistConfigFile === false; } - return (0, _helperCompilationTargets().default)(targets, { ignoreBrowserslistConfig, configFile, configPath: root, browserslistEnv: options.browserslistEnv }); -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=resolve-targets.js.map diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js.map b/node_modules/@babel/core/lib/config/resolve-targets.js.map new file mode 100644 index 00000000..3448677f --- /dev/null +++ b/node_modules/@babel/core/lib/config/resolve-targets.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","_helperCompilationTargets","resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n({}) as any as browserType as nodeType;\n\nimport type { ValidatedOptions } from \"./validation/options\";\nimport path from \"path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(\n options: ValidatedOptions,\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAQA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,0BAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASG,6BAA6BA,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,MAAGA,CAAC,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAcA,CAC5BC,OAAyB,EACzBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIU,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOhB,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ce,UAAU,GAAGf,sBAAsB;EACrC,CAAC,MAAM;IACLgB,wBAAwB,GAAGhB,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAiB,mCAAU,EAACT,OAAO,EAAE;IACzBQ,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEZ,IAAI;IAChBa,eAAe,EAAEd,OAAO,CAACc;EAC3B,CAAC,CAAC;AACJ;AAAC"} \ 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 088eac6b..077f1af8 100644 --- a/node_modules/@babel/core/lib/config/util.js +++ b/node_modules/@babel/core/lib/config/util.js @@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeOptions = mergeOptions; exports.isIterableIterator = isIterableIterator; - +exports.mergeOptions = mergeOptions; function mergeOptions(target, source) { for (const k of Object.keys(source)) { if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) { @@ -18,14 +17,15 @@ function mergeOptions(target, source) { } } } - function mergeDefaultFields(target, source) { for (const k of Object.keys(source)) { const val = source[k]; if (val !== undefined) target[k] = val; } } - function isIterableIterator(value) { return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function"; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=util.js.map diff --git a/node_modules/@babel/core/lib/config/util.js.map b/node_modules/@babel/core/lib/config/util.js.map new file mode 100644 index 00000000..63ffa195 --- /dev/null +++ b/node_modules/@babel/core/lib/config/util.js.map @@ -0,0 +1 @@ +{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type { ValidatedOptions, NormalizedOptions } from \"./validation/options\";\n\nexport function mergeOptions(\n target: ValidatedOptions,\n source: ValidatedOptions | NormalizedOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAEO,SAASA,YAAYA,CAC1BC,MAAwB,EACxBC,MAA4C,EACtC;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkBA,CAAeP,MAAS,EAAEC,MAAS,EAAE;EAC9D,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkBA,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC"} \ 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 f70765ac..684cddec 100644 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js +++ b/node_modules/@babel/core/lib/config/validation/option-assertions.js @@ -3,61 +3,50 @@ 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; -exports.assertBoolean = assertBoolean; -exports.assertObject = assertObject; exports.assertArray = assertArray; -exports.assertIgnoreList = assertIgnoreList; +exports.assertAssumptions = assertAssumptions; +exports.assertBabelrcSearch = assertBabelrcSearch; +exports.assertBoolean = assertBoolean; +exports.assertCallerMetadata = assertCallerMetadata; +exports.assertCompact = assertCompact; exports.assertConfigApplicableTest = assertConfigApplicableTest; exports.assertConfigFileSearch = assertConfigFileSearch; -exports.assertBabelrcSearch = assertBabelrcSearch; +exports.assertFunction = assertFunction; +exports.assertIgnoreList = assertIgnoreList; +exports.assertInputSourceMap = assertInputSourceMap; +exports.assertObject = assertObject; exports.assertPluginList = assertPluginList; +exports.assertRootMode = assertRootMode; +exports.assertSourceMaps = assertSourceMaps; +exports.assertSourceType = assertSourceType; +exports.assertString = assertString; exports.assertTargets = assertTargets; -exports.assertAssumptions = assertAssumptions; - +exports.msg = msg; function _helperCompilationTargets() { const data = require("@babel/helper-compilation-targets"); - _helperCompilationTargets = function () { return data; }; - return data; } - var _options = require("./options"); - 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", @@ -65,129 +54,99 @@ function access(loc, 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(`${msg(loc)} must be a boolean, "inline", "both", or undefined`); } - return value; } - function assertCompact(loc, value) { if (value !== undefined && typeof value !== "boolean" && value !== "auto") { throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`); } - return value; } - function assertSourceType(loc, value) { if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") { throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`); } - return value; } - function assertCallerMetadata(loc, value) { const obj = assertObject(loc, value); - if (obj) { - if (typeof obj["name"] !== "string") { + 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(`${msg(loc)} must be a boolean, object, or undefined`); } - return value; } - function assertString(loc, value) { if (value !== undefined && typeof value !== "string") { throw new Error(`${msg(loc)} must be a string, or undefined`); } - return value; } - function assertFunction(loc, value) { if (value !== undefined && typeof value !== "function") { throw new Error(`${msg(loc)} must be a function, or undefined`); } - return value; } - function assertBoolean(loc, value) { if (value !== undefined && typeof value !== "boolean") { throw new Error(`${msg(loc)} must be a boolean, or undefined`); } - return value; } - function assertObject(loc, value) { if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { throw new Error(`${msg(loc)} must be an object, or undefined`); } - return value; } - function assertArray(loc, value) { if (value != null && !Array.isArray(value)) { throw new Error(`${msg(loc)} must be an array, or undefined`); } - return value; } - function assertIgnoreList(loc, value) { const arr = assertArray(loc, value); - if (arr) { arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); } - return arr; } - function assertIgnoreItem(loc, value) { if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`); } - return value; } - function assertConfigApplicableTest(loc, value) { - if (value === undefined) return value; - + if (value === undefined) { + return value; + } if (Array.isArray(value)) { value.forEach((item, i) => { if (!checkValidTest(item)) { @@ -197,25 +156,21 @@ function assertConfigApplicableTest(loc, value) { } else if (!checkValidTest(value)) { throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`); } - return value; } - function checkValidTest(value) { return typeof value === "string" || typeof value === "function" || value instanceof RegExp; } - function assertConfigFileSearch(loc, value) { if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`); } - return value; } - function assertBabelrcSearch(loc, value) { - if (value === undefined || typeof value === "boolean") return value; - + if (value === undefined || typeof value === "boolean") { + return value; + } if (Array.isArray(value)) { value.forEach((item, i) => { if (!checkValidTest(item)) { @@ -225,43 +180,32 @@ function assertBabelrcSearch(loc, 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(loc, value) { const arr = assertArray(loc, value); - if (arr) { arr.forEach((item, i) => assertPluginItem(access(loc, i), item)); } - return arr; } - function assertPluginItem(loc, value) { if (Array.isArray(value)) { if (value.length === 0) { throw new Error(`${msg(loc)} must include an object`); } - if (value.length > 3) { throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`); } - assertPluginTarget(access(loc, 0), value[0]); - if (value.length > 1) { const opts = value[1]; - if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) { throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`); } } - if (value.length === 3) { const name = value[2]; - if (name !== undefined && typeof name !== "string") { throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`); } @@ -269,30 +213,23 @@ function assertPluginItem(loc, value) { } else { assertPluginTarget(loc, value); } - return value; } - function assertPluginTarget(loc, value) { if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { throw new Error(`${msg(loc)} must be a string, object, function`); } - return value; } - function assertTargets(loc, value) { if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value; - if (typeof value !== "object" || !value || Array.isArray(value)) { throw new Error(`${msg(loc)} must be a string, an array of strings or an object`); } - const browsersLoc = access(loc, "browsers"); const esmodulesLoc = access(loc, "esmodules"); assertBrowsersList(browsersLoc, value.browsers); assertBoolean(esmodulesLoc, value.esmodules); - for (const key of Object.keys(value)) { const val = value[key]; const subLoc = access(loc, key); @@ -301,52 +238,42 @@ function assertTargets(loc, value) { throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`); } else assertBrowserVersion(subLoc, val); } - return value; } - function assertBrowsersList(loc, value) { if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) { throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`); } } - function assertBrowserVersion(loc, value) { if (typeof value === "number" && Math.round(value) === value) return; if (typeof value === "string") return; throw new Error(`${msg(loc)} must be a string or an integer number`); } - function assertAssumptions(loc, value) { if (value === undefined) return; - if (typeof value !== "object" || value === null) { throw new Error(`${msg(loc)} must be an object or undefined.`); } - let root = loc; - do { root = root.parent; } while (root.type !== "root"); - const inPreset = root.source === "preset"; - for (const name of Object.keys(value)) { const subLoc = access(loc, name); - if (!_options.assumptionsNames.has(name)) { throw new Error(`${msg(subLoc)} is not a supported assumption.`); } - if (typeof value[name] !== "boolean") { throw new Error(`${msg(subLoc)} must be a boolean.`); } - if (inPreset && value[name] === false) { throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`); } } - return value; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=option-assertions.js.map diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js.map b/node_modules/@babel/core/lib/config/validation/option-assertions.js.map new file mode 100644 index 00000000..9f440d5b --- /dev/null +++ b/node_modules/@babel/core/lib/config/validation/option-assertions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_helperCompilationTargets","data","require","_options","msg","loc","type","parent","name","index","JSON","stringify","Error","access","assertRootMode","value","undefined","assertSourceMaps","assertCompact","assertSourceType","assertCallerMetadata","obj","assertObject","prop","Object","keys","propLoc","assertInputSourceMap","assertString","assertFunction","assertBoolean","Array","isArray","assertArray","assertIgnoreList","arr","forEach","item","i","assertIgnoreItem","RegExp","assertConfigApplicableTest","checkValidTest","assertConfigFileSearch","assertBabelrcSearch","assertPluginList","assertPluginItem","length","assertPluginTarget","opts","assertTargets","isBrowsersQueryValid","browsersLoc","esmodulesLoc","assertBrowsersList","browsers","esmodules","key","val","subLoc","hasOwnProperty","call","TargetNames","validTargets","join","assertBrowserVersion","Math","round","assertAssumptions","root","inPreset","source","assumptionsNames","has"],"sources":["../../../src/config/validation/option-assertions.ts"],"sourcesContent":["import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n IgnoreList,\n IgnoreItem,\n PluginList,\n PluginItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n} from \"./options\";\n\nimport { assumptionsNames } from \"./options\";\n\nexport type { RootPath } from \"./options\";\n\nexport type ValidatorSet = {\n [name: string]: Validator;\n};\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): { readonly [key: string]: unknown } | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: Array | undefined | null,\n): ReadonlyArray | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): IgnoreList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n }\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): IgnoreItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as IgnoreItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginList | void {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as any;\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwnProperty.call(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: { [key: string]: unknown },\n): { [name: string]: boolean } | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;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M,IAAII,KAAK,CAAE,GAAER,GAAG,CAACuD,MAAM,CAAE,qBAAoB,CAAC;IACtD;IACA,IAAIW,QAAQ,IAAIvD,KAAK,CAACP,IAAI,CAAC,KAAK,KAAK,EAAE;MACrC,MAAM,IAAII,KAAK,CACZ,GAAER,GAAG,CAACuD,MAAM,CAAE,2CACjB,CAAC;IACH;EACF;EAGA,OAAO5C,KAAK;AACd;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js index 40d7b7ff..1412de1e 100644 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ b/node_modules/@babel/core/lib/config/validation/options.js @@ -3,18 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.validate = validate; -exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs; exports.assumptionsNames = void 0; - -var _plugin = _interopRequireDefault(require("../plugin")); - -var _removed = _interopRequireDefault(require("./removed")); - +exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs; +exports.validate = validate; +var _removed = require("./removed"); var _optionAssertions = require("./option-assertions"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _configError = require("../../errors/config-error"); const ROOT_VALIDATORS = { cwd: _optionAssertions.assertString, root: _optionAssertions.assertString, @@ -76,20 +70,24 @@ const COMMON_VALIDATORS = { moduleId: _optionAssertions.assertString }); } -const assumptionsNames = new Set(["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]); +const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; +const assumptionsNames = new Set(knownAssumptions); exports.assumptionsNames = assumptionsNames; - function getSource(loc) { return loc.type === "root" ? loc.source : getSource(loc.parent); } - -function validate(type, opts) { - return validateNested({ - type: "root", - source: type - }, opts); +function validate(type, opts, filename) { + try { + return validateNested({ + type: "root", + source: type + }, opts); + } catch (error) { + const configError = new _configError.default(error.message, filename); + if (error.code) configError.code = error.code; + throw configError; + } } - function validateNested(loc, opts) { const type = getSource(loc); assertNoDuplicateSourcemap(opts); @@ -99,32 +97,25 @@ function validateNested(loc, opts) { name: key, parent: loc }; - if (type === "preset" && NONPRESET_VALIDATORS[key]) { throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`); } - if (type !== "arguments" && ROOT_VALIDATORS[key]) { throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`); } - 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`); } - const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError; validator(optLoc, opts[key]); }); return opts; } - function throwUnknownError(loc) { const key = loc.name; - if (_removed.default[key]) { const { message, @@ -137,25 +128,20 @@ function throwUnknownError(loc) { throw unknownOptErr; } } - function has(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } - function assertNoDuplicateSourcemap(opts) { if (has(opts, "sourceMap") && has(opts, "sourceMaps")) { throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both"); } } - 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) { for (const envName of Object.keys(obj)) { const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]); @@ -168,22 +154,17 @@ function assertEnvSet(loc, value) { validateNested(envLoc, env); } } - return obj; } - 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 (const [index, item] of arr.entries()) { const objLoc = (0, _optionAssertions.access)(loc, index); @@ -197,16 +178,16 @@ function assertOverridesList(loc, value) { validateNested(overridesLoc, env); } } - return arr; } - function checkNoUnwrappedItemOptionPairs(items, index, type, e) { if (index === 0) return; const lastItem = items[index - 1]; const thisItem = items[index]; - if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") { - e.message += `\n- Maybe you meant to use\n` + `"${type}": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`; + e.message += `\n- Maybe you meant to use\n` + `"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`; } -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=options.js.map diff --git a/node_modules/@babel/core/lib/config/validation/options.js.map b/node_modules/@babel/core/lib/config/validation/options.js.map new file mode 100644 index 00000000..2912dca7 --- /dev/null +++ b/node_modules/@babel/core/lib/config/validation/options.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","Set","exports","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","has","obj","prototype","hasOwnProperty","call","value","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item\";\nimport type Plugin from \"../plugin\";\n\nimport removed from \"./removed\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions\";\nimport type { ValidatorSet, Validator, OptionPath } from \"./option-assertions\";\nimport type { UnloadedDescriptor } from \"../config-descriptors\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"configFile\"]\n >,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator<\n ValidatedOptions[\"filenameRelative\"]\n >,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator<\n ValidatedOptions[\"babelrcRoots\"]\n >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n ValidatedOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator<\n ValidatedOptions[\"browserslistEnv\"]\n >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n ValidatedOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n ValidatedOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n ValidatedOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n ValidatedOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: IgnoreList;\n only?: IgnoreList;\n overrides?: OverridesList;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PluginList;\n plugins?: PluginList;\n passPerPreset?: boolean;\n assumptions?: {\n [name: string]: boolean;\n };\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: boolean;\n comments?: boolean;\n shouldPrintComment?: Function;\n compact?: CompactOption;\n minified?: boolean;\n auxiliaryCommentBefore?: string;\n auxiliaryCommentAfter?: string;\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: Function;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n readonly targets: Targets;\n} & Omit;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n};\nexport type EnvSet = {\n [x: string]: T;\n};\nexport type IgnoreItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\nexport type IgnoreList = ReadonlyArray;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n | ConfigItem\n | Plugin\n | PluginTarget\n | [PluginTarget, PluginOptions]\n | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray;\n\nexport type OverridesList = Array;\nexport type ConfigApplicableTest = IgnoreItem | Array;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = {} | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = (typeof knownAssumptions)[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: {},\n filename?: string,\n): ValidatedOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n const type = getSource(loc);\n\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n // eslint-disable-next-line max-len\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction has(obj: {}, key: string) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction assertNoDuplicateSourcemap(opts: {}): void {\n if (has(opts, \"sourceMap\") && has(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | OverridesList {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: Array,\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AA0BA,IAAAE,YAA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AACE,KAAK,EAAEC,IAAI,CAAC,IAAIH,GAAG,CAACI,OAAO,CAAC,CAAC,EAAE;MACzC,MAAMC,MAAM,GAAG,IAAAP,wBAAM,EAAC9B,GAAG,EAAEkC,KAAK,CAAC;MACjC,MAAM1E,GAAG,GAAG,IAAA2B,8BAAY,EAACkD,MAAM,EAAEF,IAAI,CAAC;MACtC,IAAI,CAAC3E,GAAG,EAAE,MAAM,IAAIyD,KAAK,CAAE,GAAE,IAAAC,qBAAG,EAACmB,MAAM,CAAE,oBAAmB,CAAC;MAE7D,MAAMC,YAAY,GAAG;QACnBrC,IAAI,EAAE,WAAW;QACjBiC,KAAK;QACL/B;MACF,CAAU;MACVG,cAAc,CAACgC,YAAY,EAAE9E,GAAG,CAAC;IACnC;EACF;EACA,OAAOwE,GAAG;AACZ;AAEO,SAASO,+BAA+BA,CAC7CC,KAAgC,EAChCN,KAAa,EACbjC,IAAyB,EACzBwC,CAAQ,EACF;EACN,IAAIP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACd,KAAK,KAAK,QAAQ,EAClC;IACAY,CAAC,CAAC/B,OAAO,IACN,8BAA6B,GAC7B,IAAGT,IAAK,cAAayC,QAAQ,CAACE,IAAI,CAACG,OAAQ,MAAKC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACd,KAAK,EACdiB,SAAS,EACT,CACF,CAAE,QAAO,GACR,iBAAgB7C,IAAK,gEAA+D;EACzF;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js index a70cc676..6ea3a0dc 100644 --- a/node_modules/@babel/core/lib/config/validation/plugins.js +++ b/node_modules/@babel/core/lib/config/validation/plugins.js @@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.validatePluginObject = validatePluginObject; - var _optionAssertions = require("./option-assertions"); - const VALIDATORS = { name: _optionAssertions.assertString, manipulateOptions: _optionAssertions.assertFunction, @@ -17,21 +15,16 @@ const VALIDATORS = { parserOverride: _optionAssertions.assertFunction, generatorOverride: _optionAssertions.assertFunction }; - function assertVisitorMap(loc, value) { const obj = (0, _optionAssertions.assertObject)(loc, value); - if (obj) { Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop])); - if (obj.enter || obj.exit) { throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); } } - return obj; } - function assertVisitorHandler(key, value) { if (value && typeof value === "object") { Object.keys(value).forEach(handler => { @@ -42,10 +35,8 @@ function assertVisitorHandler(key, value) { } else if (typeof value !== "function") { throw new Error(`.visitor["${key}"] must be a function`); } - return value; } - function validatePluginObject(obj) { const rootPath = { type: "root", @@ -53,7 +44,6 @@ function validatePluginObject(obj) { }; Object.keys(obj).forEach(key => { const validator = VALIDATORS[key]; - if (validator) { const optLoc = { type: "option", @@ -68,4 +58,7 @@ function validatePluginObject(obj) { } }); return obj; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=plugins.js.map diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js.map b/node_modules/@babel/core/lib/config/validation/plugins.js.map new file mode 100644 index 00000000..f8535874 --- /dev/null +++ b/node_modules/@babel/core/lib/config/validation/plugins.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_optionAssertions","require","VALIDATORS","name","assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options\";\nimport type { File, PluginPass } from \"../../index\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop]));\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): VisitorHandler | void {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n\n return value as any;\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ValidatedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void;\n post?: (this: S, file: File) => void;\n inherits?: Function;\n visitor?: Visitor;\n parserOverride?: Function;\n generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n [key: string]: unknown;\n}): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAqBA,MAAMC,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EAAEF,gCAAiD;EACvDG,QAAQ,EAAEH,gCAAqD;EAC/DI,OAAO,EAAEC,gBAAsD;EAE/DC,cAAc,EAAEN,gCAA2D;EAC3EO,iBAAiB,EAAEP;AAGrB,CAAC;AAED,SAASK,gBAAgBA,CAACG,GAAe,EAAEC,KAAc,EAAW;EAClE,MAAMC,GAAG,GAAG,IAAAC,8BAAY,EAACH,GAAG,EAAEC,KAAK,CAAC;EACpC,IAAIC,GAAG,EAAE;IACPE,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,OAAO,CAACC,IAAI,IAAIC,oBAAoB,CAACD,IAAI,EAAEL,GAAG,CAACK,IAAI,CAAC,CAAC,CAAC;IAEvE,IAAIL,GAAG,CAACO,KAAK,IAAIP,GAAG,CAACQ,IAAI,EAAE;MACzB,MAAM,IAAIC,KAAK,CACZ,GAAE,IAAAC,qBAAG,EACJZ,GACF,CAAE,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b/node_modules/@babel/core/lib/config/validation/removed.js index f0fcd7de..57270ea9 100644 --- a/node_modules/@babel/core/lib/config/validation/removed.js +++ b/node_modules/@babel/core/lib/config/validation/removed.js @@ -63,4 +63,7 @@ var _default = { message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves." } }; -exports.default = _default; \ No newline at end of file +exports.default = _default; +0 && 0; + +//# sourceMappingURL=removed.js.map diff --git a/node_modules/@babel/core/lib/config/validation/removed.js.map b/node_modules/@babel/core/lib/config/validation/removed.js.map new file mode 100644 index 00000000..51bffd2e --- /dev/null +++ b/node_modules/@babel/core/lib/config/validation/removed.js.map @@ -0,0 +1 @@ +{"version":3,"names":["auxiliaryComment","message","blacklist","breakConfig","experimental","externalHelpers","extra","jsxPragma","loose","metadataUsedHelpers","modules","nonStandard","optional","sourceMapName","stage","whitelist","resolveModuleSource","version","metadata","sourceMapTarget","exports","default","_default"],"sources":["../../../src/config/validation/removed.ts"],"sourcesContent":["export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as { [name: string]: { version?: number; message: string } };\n"],"mappings":";;;;;;eAAe;EACbA,gBAAgB,EAAE;IAChBC,OAAO,EAAE;EACX,CAAC;EACDC,SAAS,EAAE;IACTD,OAAO,EAAE;EACX,CAAC;EACDE,WAAW,EAAE;IACXF,OAAO,EAAE;EACX,CAAC;EACDG,YAAY,EAAE;IACZH,OAAO,EAAE;EACX,CAAC;EACDI,eAAe,EAAE;IACfJ,OAAO,EACL,6CAA6C,GAC7C;EACJ,CAAC;EACDK,KAAK,EAAE;IACLL,OAAO,EAAE;EACX,CAAC;EACDM,SAAS,EAAE;IACTN,OAAO,EACL,qDAAqD,GACrD;EACJ,CAAC;EACDO,KAAK,EAAE;IACLP,OAAO,EACL,mEAAmE,GACnE;EACJ,CAAC;EACDQ,mBAAmB,EAAE;IACnBR,OAAO,EAAE;EACX,CAAC;EACDS,OAAO,EAAE;IACPT,OAAO,EACL,yEAAyE,GACzE;EACJ,CAAC;EACDU,WAAW,EAAE;IACXV,OAAO,EACL,8EAA8E,GAC9E;EACJ,CAAC;EACDW,QAAQ,EAAE;IACRX,OAAO,EAAE;EACX,CAAC;EACDY,aAAa,EAAE;IACbZ,OAAO,EACL,kFAAkF,GAClF;EACJ,CAAC;EACDa,KAAK,EAAE;IACLb,OAAO,EACL;EACJ,CAAC;EACDc,SAAS,EAAE;IACTd,OAAO,EAAE;EACX,CAAC;EAEDe,mBAAmB,EAAE;IACnBC,OAAO,EAAE,CAAC;IACVhB,OAAO,EAAE;EACX,CAAC;EACDiB,QAAQ,EAAE;IACRD,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL;EACJ,CAAC;EACDkB,eAAe,EAAE;IACfF,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL,4FAA4F,GAC5F;EACJ;AACF,CAAC;AAAAmB,OAAA,CAAAC,OAAA,GAAAC,QAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/config-error.js b/node_modules/@babel/core/lib/errors/config-error.js new file mode 100644 index 00000000..7390a06a --- /dev/null +++ b/node_modules/@babel/core/lib/errors/config-error.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _rewriteStackTrace = require("./rewrite-stack-trace"); +class ConfigError extends Error { + constructor(message, filename) { + super(message); + (0, _rewriteStackTrace.expectedError)(this); + if (filename) (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename); + } +} +exports.default = ConfigError; +0 && 0; + +//# sourceMappingURL=config-error.js.map diff --git a/node_modules/@babel/core/lib/errors/config-error.js.map b/node_modules/@babel/core/lib/errors/config-error.js.map new file mode 100644 index 00000000..5d32c4e8 --- /dev/null +++ b/node_modules/@babel/core/lib/errors/config-error.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_rewriteStackTrace","require","ConfigError","Error","constructor","message","filename","expectedError","injectVirtualStackFrame","exports","default"],"sources":["../../src/errors/config-error.ts"],"sourcesContent":["import { injectVirtualStackFrame, expectedError } from \"./rewrite-stack-trace\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injectVirtualStackFrame(this, filename);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEe,MAAMC,WAAW,SAASC,KAAK,CAAC;EAC7CC,WAAWA,CAACC,OAAe,EAAEC,QAAiB,EAAE;IAC9C,KAAK,CAACD,OAAO,CAAC;IACd,IAAAE,gCAAa,EAAC,IAAI,CAAC;IACnB,IAAID,QAAQ,EAAE,IAAAE,0CAAuB,EAAC,IAAI,EAAEF,QAAQ,CAAC;EACvD;AACF;AAACG,OAAA,CAAAC,OAAA,GAAAR,WAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js new file mode 100644 index 00000000..9b6ce01e --- /dev/null +++ b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js @@ -0,0 +1,97 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.beginHiddenCallStack = beginHiddenCallStack; +exports.endHiddenCallStack = endHiddenCallStack; +exports.expectedError = expectedError; +exports.injectVirtualStackFrame = injectVirtualStackFrame; +const ErrorToString = Function.call.bind(Error.prototype.toString); +const SUPPORTED = !!Error.captureStackTrace; +const START_HIDING = "startHiding - secret - don't use this - v1"; +const STOP_HIDING = "stopHiding - secret - don't use this - v1"; +const expectedErrors = new WeakSet(); +const virtualFrames = new WeakMap(); +function CallSite(filename) { + return Object.create({ + isNative: () => false, + isConstructor: () => false, + isToplevel: () => true, + getFileName: () => filename, + getLineNumber: () => undefined, + getColumnNumber: () => undefined, + getFunctionName: () => undefined, + getMethodName: () => undefined, + getTypeName: () => undefined, + toString: () => filename + }); +} +function injectVirtualStackFrame(error, filename) { + if (!SUPPORTED) return; + let frames = virtualFrames.get(error); + if (!frames) virtualFrames.set(error, frames = []); + frames.push(CallSite(filename)); + return error; +} +function expectedError(error) { + if (!SUPPORTED) return; + expectedErrors.add(error); + return error; +} +function beginHiddenCallStack(fn) { + if (!SUPPORTED) return fn; + return Object.defineProperty(function (...args) { + setupPrepareStackTrace(); + return fn(...args); + }, "name", { + value: STOP_HIDING + }); +} +function endHiddenCallStack(fn) { + if (!SUPPORTED) return fn; + return Object.defineProperty(function (...args) { + return fn(...args); + }, "name", { + value: START_HIDING + }); +} +function setupPrepareStackTrace() { + setupPrepareStackTrace = () => {}; + const { + prepareStackTrace = defaultPrepareStackTrace + } = Error; + const MIN_STACK_TRACE_LIMIT = 50; + Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT)); + Error.prepareStackTrace = function stackTraceRewriter(err, trace) { + let newTrace = []; + const isExpected = expectedErrors.has(err); + let status = isExpected ? "hiding" : "unknown"; + for (let i = 0; i < trace.length; i++) { + const name = trace[i].getFunctionName(); + if (name === START_HIDING) { + status = "hiding"; + } else if (name === STOP_HIDING) { + if (status === "hiding") { + status = "showing"; + if (virtualFrames.has(err)) { + newTrace.unshift(...virtualFrames.get(err)); + } + } else if (status === "unknown") { + newTrace = trace; + break; + } + } else if (status !== "hiding") { + newTrace.push(trace[i]); + } + } + return prepareStackTrace(err, newTrace); + }; +} +function defaultPrepareStackTrace(err, trace) { + if (trace.length === 0) return ErrorToString(err); + return `${ErrorToString(err)}\n at ${trace.join("\n at ")}`; +} +0 && 0; + +//# sourceMappingURL=rewrite-stack-trace.js.map diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map new file mode 100644 index 00000000..c43283bb --- /dev/null +++ b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","Object","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED = !!Error.captureStackTrace;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = Parameters[1][number];\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n // eslint-disable-next-line no-func-assign\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"mappings":";;;;;;;;;AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC;AAElE,MAAMC,SAAS,GAAG,CAAC,CAACH,KAAK,CAACI,iBAAiB;AAE3C,MAAMC,YAAY,GAAG,4CAA4C;AACjE,MAAMC,WAAW,GAAG,2CAA2C;AAI/D,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAQ,CAAC;AAC3C,MAAMC,aAAa,GAAG,IAAIC,OAAO,CAAoB,CAAC;AAEtD,SAASC,QAAQA,CAACC,QAAgB,EAAY;EAE5C,OAA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AAC,EAAE;YAC1BE,QAAQ,CAACO,OAAO,CAAC,GAAG/C,aAAa,CAACmB,GAAG,CAACmB,GAAG,CAAC,CAAC;UAC7C;QACF,CAAC,MAAM,IAAIK,MAAM,KAAK,SAAS,EAAE;UAE/BH,QAAQ,GAAGD,KAAK;UAChB;QACF;MACF,CAAC,MAAM,IAAII,MAAM,KAAK,QAAQ,EAAE;QAC9BH,QAAQ,CAACnB,IAAI,CAACkB,KAAK,CAACK,CAAC,CAAC,CAAC;MACzB;IACF;IAEA,OAAOb,iBAAiB,CAACO,GAAG,EAAEE,QAAQ,CAAC;EACzC,CAAC;AACH;AAEA,SAASR,wBAAwBA,CAACM,GAAU,EAAEC,KAAiB,EAAE;EAC/D,IAAIA,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE,OAAO1D,aAAa,CAACmD,GAAG,CAAC;EACjD,OAAQ,GAAEnD,aAAa,CAACmD,GAAG,CAAE,YAAWC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAE,EAAC;AACnE;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js b/node_modules/@babel/core/lib/gensync-utils/async.js index c65e1ff7..9cbe3dc3 100644 --- a/node_modules/@babel/core/lib/gensync-utils/async.js +++ b/node_modules/@babel/core/lib/gensync-utils/async.js @@ -3,53 +3,59 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.maybeAsync = maybeAsync; exports.forwardAsync = forwardAsync; +exports.isAsync = void 0; exports.isThenable = isThenable; -exports.waitFor = exports.onFirstPause = exports.isAsync = void 0; - -const gensync = require("gensync"); - -const id = x => x; - -const runGenerator = gensync(function* (item) { +exports.maybeAsync = maybeAsync; +exports.waitFor = exports.onFirstPause = void 0; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +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); } } +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); }); }; } +const runGenerator = _gensync()(function* (item) { return yield* item; }); -const isAsync = gensync({ +const isAsync = _gensync()({ sync: () => false, errback: cb => cb(null, true) }); exports.isAsync = isAsync; - function maybeAsync(fn, message) { - return gensync({ + return _gensync()({ sync(...args) { const result = fn.apply(this, args); if (isThenable(result)) throw new Error(message); return result; }, - async(...args) { return Promise.resolve(fn.apply(this, args)); } - }); } - -const withKind = gensync({ +const withKind = _gensync()({ sync: cb => cb("sync"), - async: cb => cb("async") + async: function () { + var _ref = _asyncToGenerator(function* (cb) { + return cb("async"); + }); + return function async(_x) { + return _ref.apply(this, arguments); + }; + }() }); - function forwardAsync(action, cb) { - const g = gensync(action); + const g = _gensync()(action); return withKind(kind => { const adapted = g[kind]; return cb(adapted); }); } - -const onFirstPause = gensync({ +const onFirstPause = _gensync()({ name: "onFirstPause", arity: 2, sync: function (item) { @@ -61,19 +67,27 @@ const onFirstPause = gensync({ completed = true; cb(err, value); }); - if (!completed) { firstPause(); } } }); exports.onFirstPause = onFirstPause; -const waitFor = gensync({ - sync: id, - async: id +const waitFor = _gensync()({ + sync: x => x, + async: function () { + var _ref2 = _asyncToGenerator(function* (x) { + return x; + }); + return function async(_x2) { + return _ref2.apply(this, arguments); + }; + }() }); exports.waitFor = waitFor; - function isThenable(val) { return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=async.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js.map b/node_modules/@babel/core/lib/gensync-utils/async.js.map new file mode 100644 index 00000000..7c49063c --- /dev/null +++ b/node_modules/@babel/core/lib/gensync-utils/async.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","runGenerator","gensync","item","isAsync","sync","errback","cb","exports","maybeAsync","message","result","isThenable","Error","async","withKind","_ref","_x","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","waitFor","x","_ref2","_x2","val"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAE,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,EAAAI,IAAA,CAAAT,KAAA,E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B,SAAMA,CAAC,CAAC;EAC7BG,IAAI,EAAEwB,CAAC,IAAIA,CAAC;EACZf,KAAK;IAAA,IAAAgB,KAAA,GAAArC,iBAAA,CAAE,WAAMoC,CAAC;MAAA,OAAIA,CAAC;IAAA;IAAA,gBAAAf,MAAAiB,GAAA;MAAA,OAAAD,KAAA,CAAAhC,KAAA,OAAAD,SAAA;IAAA;EAAA;AACrB,CAAC,CAAyC;AAACW,OAAA,CAAAoB,OAAA,GAAAA,OAAA;AAEpC,SAAShB,UAAUA,CAAUoB,GAAQ,EAAyB;EACnE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACxC,IAAI,IACV,OAAOwC,GAAG,CAACxC,IAAI,KAAK,UAAU;AAElC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js b/node_modules/@babel/core/lib/gensync-utils/fs.js index 68b9dbe9..db7f3d1d 100644 --- a/node_modules/@babel/core/lib/gensync-utils/fs.js +++ b/node_modules/@babel/core/lib/gensync-utils/fs.js @@ -3,32 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.stat = exports.exists = exports.readFile = void 0; - -const fs = require("fs"); - -const gensync = require("gensync"); - -const readFile = gensync({ - sync: fs.readFileSync, - errback: fs.readFile +exports.stat = exports.readFile = void 0; +function _fs() { + const data = require("fs"); + _fs = function () { + return data; + }; + return data; +} +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +const readFile = _gensync()({ + sync: _fs().readFileSync, + errback: _fs().readFile }); exports.readFile = readFile; -const exists = gensync({ - sync(path) { - try { - fs.accessSync(path); - return true; - } catch (_unused) { - return false; - } - }, - - errback: (path, cb) => fs.access(path, undefined, err => cb(null, !err)) -}); -exports.exists = exists; -const stat = gensync({ - sync: fs.statSync, - errback: fs.stat +const stat = _gensync()({ + sync: _fs().statSync, + errback: _fs().stat }); -exports.stat = stat; \ No newline at end of file +exports.stat = stat; +0 && 0; + +//# sourceMappingURL=fs.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js.map b/node_modules/@babel/core/lib/gensync-utils/fs.js.map new file mode 100644 index 00000000..6d1a50a5 --- /dev/null +++ b/node_modules/@babel/core/lib/gensync-utils/fs.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_fs","data","require","_gensync","readFile","gensync","sync","fs","readFileSync","errback","exports","stat","statSync"],"sources":["../../src/gensync-utils/fs.ts"],"sourcesContent":["import fs from \"fs\";\nimport gensync from \"gensync\";\n\nexport const readFile = gensync<[filepath: string, encoding: \"utf8\"], string>({\n sync: fs.readFileSync,\n errback: fs.readFile,\n});\n\nexport const stat = gensync({\n sync: fs.statSync,\n errback: fs.stat,\n});\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,QAAQ,GAAGC,SAAMA,CAAC,CAA+C;EAC5EC,IAAI,EAAEC,IAACA,CAAC,CAACC,YAAY;EACrBC,OAAO,EAAEF,IAACA,CAAC,CAACH;AACd,CAAC,CAAC;AAACM,OAAA,CAAAN,QAAA,GAAAA,QAAA;AAEI,MAAMO,IAAI,GAAGN,SAAMA,CAAC,CAAC;EAC1BC,IAAI,EAAEC,IAACA,CAAC,CAACK,QAAQ;EACjBH,OAAO,EAAEF,IAACA,CAAC,CAACI;AACd,CAAC,CAAC;AAACD,OAAA,CAAAC,IAAA,GAAAA,IAAA;AAAA"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/functional.js b/node_modules/@babel/core/lib/gensync-utils/functional.js new file mode 100644 index 00000000..db849596 --- /dev/null +++ b/node_modules/@babel/core/lib/gensync-utils/functional.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.once = once; +var _async = require("./async"); +function once(fn) { + let result; + let resultP; + return function* () { + if (result) return result; + if (!(yield* (0, _async.isAsync)())) return result = yield* fn(); + if (resultP) return yield* (0, _async.waitFor)(resultP); + let resolve, reject; + resultP = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + try { + result = yield* fn(); + resultP = null; + resolve(result); + return result; + } catch (error) { + reject(error); + throw error; + } + }; +} +0 && 0; + +//# sourceMappingURL=functional.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/functional.js.map b/node_modules/@babel/core/lib/gensync-utils/functional.js.map new file mode 100644 index 00000000..d2a9c4e9 --- /dev/null +++ b/node_modules/@babel/core/lib/gensync-utils/functional.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_async","require","once","fn","result","resultP","isAsync","waitFor","resolve","reject","Promise","res","rej","error"],"sources":["../../src/gensync-utils/functional.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: R;\n let resultP: Promise;\n return function* () {\n if (result) return result;\n if (!(yield* isAsync())) return (result = yield* fn());\n if (resultP) return yield* waitFor(resultP);\n\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = yield* fn();\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n resolve(result);\n return result;\n } catch (error) {\n reject(error);\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,IAAIA,CAAIC,EAAoB,EAAoB;EAC9D,IAAIC,MAAS;EACb,IAAIC,OAAmB;EACvB,OAAO,aAAa;IAClB,IAAID,MAAM,EAAE,OAAOA,MAAM;IACzB,IAAI,EAAE,OAAO,IAAAE,cAAO,EAAC,CAAC,CAAC,EAAE,OAAQF,MAAM,GAAG,OAAOD,EAAE,CAAC,CAAC;IACrD,IAAIE,OAAO,EAAE,OAAO,OAAO,IAAAE,cAAO,EAACF,OAAO,CAAC;IAE3C,IAAIG,OAA4B,EAAEC,MAAgC;IAClEJ,OAAO,GAAG,IAAIK,OAAO,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;MAClCJ,OAAO,GAAGG,GAAG;MACbF,MAAM,GAAGG,GAAG;IACd,CAAC,CAAC;IAEF,IAAI;MACFR,MAAM,GAAG,OAAOD,EAAE,CAAC,CAAC;MAGpBE,OAAO,GAAG,IAAI;MACdG,OAAO,CAACJ,MAAM,CAAC;MACf,OAAOA,MAAM;IACf,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb,MAAMA,KAAK;IACb;EACF,CAAC;AACH;AAAC"} \ 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 23f0556e..6dcfba17 100644 --- a/node_modules/@babel/core/lib/index.js +++ b/node_modules/@babel/core/lib/index.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.Plugin = Plugin; +exports.DEFAULT_EXTENSIONS = void 0; Object.defineProperty(exports, "File", { enumerable: true, get: function () { @@ -16,16 +16,22 @@ Object.defineProperty(exports, "buildExternalHelpers", { return _buildExternalHelpers.default; } }); -Object.defineProperty(exports, "resolvePlugin", { +Object.defineProperty(exports, "createConfigItem", { enumerable: true, get: function () { - return _files.resolvePlugin; + return _config.createConfigItem; } }); -Object.defineProperty(exports, "resolvePreset", { +Object.defineProperty(exports, "createConfigItemAsync", { enumerable: true, get: function () { - return _files.resolvePreset; + return _config.createConfigItemAsync; + } +}); +Object.defineProperty(exports, "createConfigItemSync", { + enumerable: true, + get: function () { + return _config.createConfigItemSync; } }); Object.defineProperty(exports, "getEnv", { @@ -34,88 +40,88 @@ Object.defineProperty(exports, "getEnv", { return _environment.getEnv; } }); -Object.defineProperty(exports, "tokTypes", { +Object.defineProperty(exports, "loadOptions", { enumerable: true, get: function () { - return _parser().tokTypes; + return _config.loadOptions; } }); -Object.defineProperty(exports, "traverse", { +Object.defineProperty(exports, "loadOptionsAsync", { enumerable: true, get: function () { - return _traverse().default; + return _config.loadOptionsAsync; } }); -Object.defineProperty(exports, "template", { +Object.defineProperty(exports, "loadOptionsSync", { enumerable: true, get: function () { - return _template().default; + return _config.loadOptionsSync; } }); -Object.defineProperty(exports, "createConfigItem", { +Object.defineProperty(exports, "loadPartialConfig", { enumerable: true, get: function () { - return _config.createConfigItem; + return _config.loadPartialConfig; } }); -Object.defineProperty(exports, "createConfigItemSync", { +Object.defineProperty(exports, "loadPartialConfigAsync", { enumerable: true, get: function () { - return _config.createConfigItemSync; + return _config.loadPartialConfigAsync; } }); -Object.defineProperty(exports, "createConfigItemAsync", { +Object.defineProperty(exports, "loadPartialConfigSync", { enumerable: true, get: function () { - return _config.createConfigItemAsync; + return _config.loadPartialConfigSync; } }); -Object.defineProperty(exports, "loadPartialConfig", { +Object.defineProperty(exports, "parse", { enumerable: true, get: function () { - return _config.loadPartialConfig; + return _parse.parse; } }); -Object.defineProperty(exports, "loadPartialConfigSync", { +Object.defineProperty(exports, "parseAsync", { enumerable: true, get: function () { - return _config.loadPartialConfigSync; + return _parse.parseAsync; } }); -Object.defineProperty(exports, "loadPartialConfigAsync", { +Object.defineProperty(exports, "parseSync", { enumerable: true, get: function () { - return _config.loadPartialConfigAsync; + return _parse.parseSync; } }); -Object.defineProperty(exports, "loadOptions", { +Object.defineProperty(exports, "resolvePlugin", { enumerable: true, get: function () { - return _config.loadOptions; + return _files.resolvePlugin; } }); -Object.defineProperty(exports, "loadOptionsSync", { +Object.defineProperty(exports, "resolvePreset", { enumerable: true, get: function () { - return _config.loadOptionsSync; + return _files.resolvePreset; } }); -Object.defineProperty(exports, "loadOptionsAsync", { +Object.defineProperty((0, exports), "template", { enumerable: true, get: function () { - return _config.loadOptionsAsync; + return _template().default; } }); -Object.defineProperty(exports, "transform", { +Object.defineProperty((0, exports), "tokTypes", { enumerable: true, get: function () { - return _transform.transform; + return _parser().tokTypes; } }); -Object.defineProperty(exports, "transformSync", { +Object.defineProperty(exports, "transform", { enumerable: true, get: function () { - return _transform.transformSync; + return _transform.transform; } }); Object.defineProperty(exports, "transformAsync", { @@ -130,28 +136,22 @@ Object.defineProperty(exports, "transformFile", { return _transformFile.transformFile; } }); -Object.defineProperty(exports, "transformFileSync", { - enumerable: true, - get: function () { - return _transformFile.transformFileSync; - } -}); Object.defineProperty(exports, "transformFileAsync", { enumerable: true, get: function () { return _transformFile.transformFileAsync; } }); -Object.defineProperty(exports, "transformFromAst", { +Object.defineProperty(exports, "transformFileSync", { enumerable: true, get: function () { - return _transformAst.transformFromAst; + return _transformFile.transformFileSync; } }); -Object.defineProperty(exports, "transformFromAstSync", { +Object.defineProperty(exports, "transformFromAst", { enumerable: true, get: function () { - return _transformAst.transformFromAstSync; + return _transformAst.transformFromAst; } }); Object.defineProperty(exports, "transformFromAstAsync", { @@ -160,111 +160,86 @@ Object.defineProperty(exports, "transformFromAstAsync", { return _transformAst.transformFromAstAsync; } }); -Object.defineProperty(exports, "parse", { +Object.defineProperty(exports, "transformFromAstSync", { enumerable: true, get: function () { - return _parse.parse; + return _transformAst.transformFromAstSync; } }); -Object.defineProperty(exports, "parseSync", { +Object.defineProperty(exports, "transformSync", { enumerable: true, get: function () { - return _parse.parseSync; + return _transform.transformSync; } }); -Object.defineProperty(exports, "parseAsync", { +Object.defineProperty((0, exports), "traverse", { enumerable: true, get: function () { - return _parse.parseAsync; + return _traverse().default; } }); -exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = exports.version = void 0; - -var _file = _interopRequireDefault(require("./transformation/file/file")); - -var _buildExternalHelpers = _interopRequireDefault(require("./tools/build-external-helpers")); - +exports.version = exports.types = void 0; +var _file = require("./transformation/file/file"); +var _buildExternalHelpers = require("./tools/build-external-helpers"); var _files = require("./config/files"); - var _environment = require("./config/helpers/environment"); - function _types() { - const data = _interopRequireWildcard(require("@babel/types")); - + const data = require("@babel/types"); _types = function () { return data; }; - return data; } - -Object.defineProperty(exports, "types", { +Object.defineProperty((0, exports), "types", { enumerable: true, get: function () { return _types(); } }); - function _parser() { const data = require("@babel/parser"); - _parser = function () { return data; }; - return data; } - function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - + const data = require("@babel/traverse"); _traverse = function () { return data; }; - return data; } - function _template() { - const data = _interopRequireDefault(require("@babel/template")); - + const data = require("@babel/template"); _template = function () { return data; }; - return data; } - var _config = require("./config"); - var _transform = require("./transform"); - var _transformFile = require("./transform-file"); - var _transformAst = require("./transform-ast"); - var _parse = require("./parse"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const version = "7.13.14"; +var thisFile = require("./index"); +const version = "7.22.1"; exports.version = version; const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; - -class OptionManager { - init(opts) { - return (0, _config.loadOptions)(opts); +; +{ + { + exports.OptionManager = class OptionManager { + init(opts) { + return (0, _config.loadOptionsSync)(opts); + } + }; + exports.Plugin = function Plugin(alias) { + throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`); + }; } - } +0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0); -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 +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/index.js.map b/node_modules/@babel/core/lib/index.js.map new file mode 100644 index 00000000..40465ef2 --- /dev/null +++ b/node_modules/@babel/core/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_file","require","_buildExternalHelpers","_files","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_config","_transform","_transformFile","_transformAst","_parse","thisFile","version","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["export const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers\";\nexport { resolvePlugin, resolvePreset } from \"./config/files\";\n\nexport { getEnv } from \"./config/helpers/environment\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\nexport {\n createConfigItem,\n createConfigItemSync,\n createConfigItemAsync,\n} from \"./config\";\n\nexport {\n loadPartialConfig,\n loadPartialConfigSync,\n loadPartialConfigAsync,\n loadOptions,\n loadOptionsAsync,\n} from \"./config\";\nimport { loadOptionsSync } from \"./config\";\nexport { loadOptionsSync };\n\nexport type {\n CallerMetadata,\n InputOptions,\n PluginAPI,\n PluginObject,\n PresetAPI,\n PresetObject,\n} from \"./config\";\n\nexport {\n transform,\n transformSync,\n transformAsync,\n type FileResult,\n} from \"./transform\";\nexport {\n transformFile,\n transformFileSync,\n transformFileAsync,\n} from \"./transform-file\";\nexport {\n transformFromAst,\n transformFromAstSync,\n transformFromAstAsync,\n} from \"./transform-ast\";\nexport { parse, parseSync, parseAsync } from \"./parse\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\nimport Module from \"module\";\nimport * as thisFile from \"./index\";\nif (USE_ESM) {\n if (!IS_STANDALONE) {\n // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n if (!USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.OptionManager = class OptionManager {\n init(opts: {}) {\n return loadOptionsSync(opts);\n }\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.Plugin = function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA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e,aAAa,GAAG,MAAMA,aAAa,CAAC;MAC1CC,IAAIA,CAACC,IAAQ,EAAE;QACb,OAAO,IAAAC,uBAAe,EAACD,IAAI,CAAC;MAC9B;IACF,CAAC;IAGDjB,OAAO,CAACmB,MAAM,GAAG,SAASA,MAAMA,CAACC,KAAa,EAAE;MAC9C,MAAM,IAAIC,KAAK,CACZ,QAAOD,KAAM,kEAChB,CAAC;IACH,CAAC;EACH;AACF;AAAC,MAAApB,OAAA,CAAAsB,KAAA,GAAAtB,OAAA,CAAAuB,QAAA,GAAAvB,OAAA,CAAAwB,QAAA,GAAAxB,OAAA,CAAAyB,QAAA"} \ 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 f58889cc..93bb7d10 100644 --- a/node_modules/@babel/core/lib/parse.js +++ b/node_modules/@babel/core/lib/parse.js @@ -3,40 +3,46 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseAsync = exports.parseSync = exports.parse = void 0; - -var _config = _interopRequireDefault(require("./config")); - -var _parser = _interopRequireDefault(require("./parser")); - -var _normalizeOpts = _interopRequireDefault(require("./transformation/normalize-opts")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const gensync = require("gensync"); - -const parseRunner = gensync(function* parse(code, opts) { +exports.parse = void 0; +exports.parseAsync = parseAsync; +exports.parseSync = parseSync; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _config = require("./config"); +var _parser = require("./parser"); +var _normalizeOpts = require("./transformation/normalize-opts"); +var _rewriteStackTrace = require("./errors/rewrite-stack-trace"); +const parseRunner = _gensync()(function* parse(code, opts) { const config = yield* (0, _config.default)(opts); - if (config === null) { return null; } - return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code); }); - const parse = function parse(code, opts, callback) { if (typeof opts === "function") { callback = opts; opts = undefined; } - - if (callback === undefined) return parseRunner.sync(code, opts); - parseRunner.errback(code, opts, callback); + if (callback === undefined) { + { + return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code, opts); + } + } + (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback); }; - exports.parse = parse; -const parseSync = parseRunner.sync; -exports.parseSync = parseSync; -const parseAsync = parseRunner.async; -exports.parseAsync = parseAsync; \ No newline at end of file +function parseSync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args); +} +function parseAsync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args); +} +0 && 0; + +//# sourceMappingURL=parse.js.map diff --git a/node_modules/@babel/core/lib/parse.js.map b/node_modules/@babel/core/lib/parse.js.map new file mode 100644 index 00000000..3cd608f2 --- /dev/null +++ b/node_modules/@babel/core/lib/parse.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_config","_parser","_normalizeOpts","_rewriteStackTrace","parseRunner","gensync","parse","code","opts","config","loadConfig","parser","passes","normalizeOptions","callback","undefined","beginHiddenCallStack","sync","errback","exports","parseSync","args","parseAsync","async"],"sources":["../src/parse.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions } from \"./config\";\nimport parser from \"./parser\";\nimport type { ParseResult } from \"./parser\";\nimport normalizeOptions from \"./transformation/normalize-opts\";\nimport type { ValidatedOptions } from \"./config/validation/options\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as ValidatedOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAGA,IAAAI,kBAAA,GAAAJ,OAAA;AAiBA,MAAMK,WAAW,GAAGC,SAAMA,CAAC,CAAC,UAAUC,KAAKA,CACzCC,IAAY,EACZC,IAAqC,EACR;EAC7B,MAAMC,MAAM,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAEtC,IAAIC,MAAM,KAAK,IAAI,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,OAAO,OAAO,IAAAE,eAAM,EAACF,MAAM,CAACG,MAAM,EAAE,IAAAC,sBAAgB,EAACJ,MAAM,CAAC,EAAEF,IAAI,CAAC;AACrE,CAAC,CAAC;AAEK,MAAMD,KAAY,GAAG,SAASA,KAAKA,CACxCC,IAAI,EACJC,IAAK,EACLM,QAA4B,EAC5B;EACA,IAAI,OAAON,IAAI,KAAK,UAAU,EAAE;IAC9BM,QAAQ,GAAGN,IAAI;IACfA,IAAI,GAAGO,SAA6B;EACtC;EAEA,IAAID,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACZ,WAAW,CAACa,IAAI,CAAC,CAACV,IAAI,EAAEC,IAAI,CAAC;IAC3D;EACF;EAEA,IAAAQ,uCAAoB,EAACZ,WAAW,CAACc,OAAO,CAAC,CAACX,IAAI,EAAEC,IAAI,EAAEM,QAAQ,CAAC;AACjE,CAAC;AAACK,OAAA,CAAAb,KAAA,GAAAA,KAAA;AAEK,SAASc,SAASA,CAAC,GAAGC,IAAyC,EAAE;EACtE,OAAO,IAAAL,uCAAoB,EAACZ,WAAW,CAACa,IAAI,CAAC,CAAC,GAAGI,IAAI,CAAC;AACxD;AACO,SAASC,UAAUA,CAAC,GAAGD,IAA0C,EAAE;EACxE,OAAO,IAAAL,uCAAoB,EAACZ,WAAW,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACzD;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/index.js b/node_modules/@babel/core/lib/parser/index.js index e8fcc7fe..b2b05cfe 100644 --- a/node_modules/@babel/core/lib/parser/index.js +++ b/node_modules/@babel/core/lib/parser/index.js @@ -4,31 +4,21 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = parser; - 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; } - -var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _missingPluginHelper = require("./util/missing-plugin-helper"); function* parser(pluginPasses, { parserOpts, highlightCode = true, @@ -36,43 +26,35 @@ function* parser(pluginPasses, { }, code) { try { const results = []; - for (const plugins of pluginPasses) { for (const plugin of plugins) { const { parserOverride } = plugin; - if (parserOverride) { const ast = parserOverride(code, parserOpts, _parser().parse); if (ast !== undefined) results.push(ast); } } } - if (results.length === 0) { return (0, _parser().parse)(code, parserOpts); } else if (results.length === 1) { yield* []; - if (typeof results[0].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.`); } - return results[0]; } - throw new Error("More than one plugin attempted to override parsing."); } catch (err) { if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; } - const { loc, missingPlugin } = err; - if (loc) { const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { start: { @@ -82,16 +64,16 @@ function* parser(pluginPasses, { }, { highlightCode }); - if (missingPlugin) { err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); } else { err.message = `${filename}: ${err.message}\n\n` + codeFrame; } - err.code = "BABEL_PARSE_ERROR"; } - throw err; } -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/parser/index.js.map b/node_modules/@babel/core/lib/parser/index.js.map new file mode 100644 index 00000000..c4386985 --- /dev/null +++ b/node_modules/@babel/core/lib/parser/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper\";\nimport type { PluginPasses } from \"../config\";\n\nexport type ParseResult = ReturnType;\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // @ts-expect-error - If we want to allow async parsers\n yield* [];\n if (typeof results[0].then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;I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GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CACF,CAAC;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACR,GAAEd,QAAS,IAAG,GACf,IAAAsB,4BAA4B,EAACN,aAAa,CAAC,CAAC,CAAC,EAAED,GAAG,EAAEE,SAAS,CAAC;MAClE,CAAC,MAAM;QACLJ,GAAG,CAACC,OAAO,GAAI,GAAEd,QAAS,KAAIa,GAAG,CAACC,OAAQ,MAAK,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js index 79897587..1c2f4ca3 100644 --- a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +++ b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js @@ -5,293 +5,313 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = generateMissingPluginMessage; const pluginNameMap = { - classProperties: { + asyncDoExpressions: { syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - classPrivateProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - classPrivateMethods: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-private-methods", - url: "https://git.io/JvpRG" - } - }, - classStaticBlock: { - syntax: { - name: "@babel/plugin-syntax-class-static-block", - url: "https://git.io/JTLB6" - }, - transform: { - name: "@babel/plugin-proposal-class-static-block", - url: "https://git.io/JTLBP" + name: "@babel/plugin-syntax-async-do-expressions", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions" } }, decimal: { syntax: { name: "@babel/plugin-syntax-decimal", - url: "https://git.io/JfKOH" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal" } }, decorators: { syntax: { name: "@babel/plugin-syntax-decorators", - url: "https://git.io/vb4y9" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators" }, transform: { name: "@babel/plugin-proposal-decorators", - url: "https://git.io/vb4ST" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators" } }, doExpressions: { syntax: { name: "@babel/plugin-syntax-do-expressions", - url: "https://git.io/vb4yh" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions" }, transform: { name: "@babel/plugin-proposal-do-expressions", - url: "https://git.io/vb4S3" - } - }, - dynamicImport: { - syntax: { - name: "@babel/plugin-syntax-dynamic-import", - url: "https://git.io/vb4Sv" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions" } }, exportDefaultFrom: { syntax: { name: "@babel/plugin-syntax-export-default-from", - url: "https://git.io/vb4SO" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from" }, transform: { name: "@babel/plugin-proposal-export-default-from", - url: "https://git.io/vb4yH" - } - }, - exportNamespaceFrom: { - syntax: { - name: "@babel/plugin-syntax-export-namespace-from", - url: "https://git.io/vb4Sf" - }, - transform: { - name: "@babel/plugin-proposal-export-namespace-from", - url: "https://git.io/vb4SG" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from" } }, flow: { syntax: { name: "@babel/plugin-syntax-flow", - url: "https://git.io/vb4yb" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow" }, transform: { name: "@babel/preset-flow", - url: "https://git.io/JfeDn" + url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow" } }, functionBind: { syntax: { name: "@babel/plugin-syntax-function-bind", - url: "https://git.io/vb4y7" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind" }, transform: { name: "@babel/plugin-proposal-function-bind", - url: "https://git.io/vb4St" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind" } }, functionSent: { syntax: { name: "@babel/plugin-syntax-function-sent", - url: "https://git.io/vb4yN" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent" }, transform: { name: "@babel/plugin-proposal-function-sent", - url: "https://git.io/vb4SZ" - } - }, - importMeta: { - syntax: { - name: "@babel/plugin-syntax-import-meta", - url: "https://git.io/vbKK6" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent" } }, jsx: { syntax: { name: "@babel/plugin-syntax-jsx", - url: "https://git.io/vb4yA" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx" }, transform: { name: "@babel/preset-react", - url: "https://git.io/JfeDR" - } - }, - importAssertions: { - syntax: { - name: "@babel/plugin-syntax-import-assertions", - url: "https://git.io/JUbkv" - } - }, - moduleStringNames: { - syntax: { - name: "@babel/plugin-syntax-module-string-names", - url: "https://git.io/JTL8G" + url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react" } }, - numericSeparator: { + importAttributes: { syntax: { - name: "@babel/plugin-syntax-numeric-separator", - url: "https://git.io/vb4Sq" - }, - transform: { - name: "@babel/plugin-proposal-numeric-separator", - url: "https://git.io/vb4yS" - } - }, - optionalChaining: { - syntax: { - name: "@babel/plugin-syntax-optional-chaining", - url: "https://git.io/vb4Sc" - }, - transform: { - name: "@babel/plugin-proposal-optional-chaining", - url: "https://git.io/vb4Sk" + name: "@babel/plugin-syntax-import-attributes", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes" } }, pipelineOperator: { syntax: { name: "@babel/plugin-syntax-pipeline-operator", - url: "https://git.io/vb4yj" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator" }, transform: { name: "@babel/plugin-proposal-pipeline-operator", - url: "https://git.io/vb4SU" - } - }, - privateIn: { - syntax: { - name: "@babel/plugin-syntax-private-property-in-object", - url: "https://git.io/JfK3q" - }, - transform: { - name: "@babel/plugin-proposal-private-property-in-object", - url: "https://git.io/JfK3O" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator" } }, recordAndTuple: { syntax: { name: "@babel/plugin-syntax-record-and-tuple", - url: "https://git.io/JvKp3" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple" } }, throwExpressions: { syntax: { name: "@babel/plugin-syntax-throw-expressions", - url: "https://git.io/vb4SJ" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions" }, transform: { name: "@babel/plugin-proposal-throw-expressions", - url: "https://git.io/vb4yF" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions" } }, typescript: { syntax: { name: "@babel/plugin-syntax-typescript", - url: "https://git.io/vb4SC" + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript" }, transform: { name: "@babel/preset-typescript", - url: "https://git.io/JfeDz" + url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript" } - }, - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY" + } +}; +{ + Object.assign(pluginNameMap, { + asyncGenerators: { + syntax: { + name: "@babel/plugin-syntax-async-generators", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators" + }, + transform: { + name: "@babel/plugin-transform-async-generator-functions", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions" + } }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp" - } - }, - logicalAssignment: { - syntax: { - name: "@babel/plugin-syntax-logical-assignment-operators", - url: "https://git.io/vAlBp" + classProperties: { + syntax: { + name: "@babel/plugin-syntax-class-properties", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" + }, + transform: { + name: "@babel/plugin-transform-class-properties", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" + } }, - transform: { - name: "@babel/plugin-proposal-logical-assignment-operators", - url: "https://git.io/vAlRe" - } - }, - nullishCoalescingOperator: { - syntax: { - name: "@babel/plugin-syntax-nullish-coalescing-operator", - url: "https://git.io/vb4yx" + classPrivateProperties: { + syntax: { + name: "@babel/plugin-syntax-class-properties", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" + }, + transform: { + name: "@babel/plugin-transform-class-properties", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" + } }, - transform: { - name: "@babel/plugin-proposal-nullish-coalescing-operator", - url: "https://git.io/vb4Se" - } - }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5" + classPrivateMethods: { + syntax: { + name: "@babel/plugin-syntax-class-properties", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" + }, + transform: { + name: "@babel/plugin-transform-private-methods", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods" + } }, - 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" + classStaticBlock: { + syntax: { + name: "@babel/plugin-syntax-class-static-block", + url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block" + }, + transform: { + name: "@babel/plugin-transform-class-static-block", + url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block" + } }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI" + dynamicImport: { + syntax: { + name: "@babel/plugin-syntax-dynamic-import", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import" + } + }, + exportNamespaceFrom: { + syntax: { + name: "@babel/plugin-syntax-export-namespace-from", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from" + }, + transform: { + name: "@babel/plugin-transform-export-namespace-from", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from" + } + }, + importAssertions: { + syntax: { + name: "@babel/plugin-syntax-import-assertions", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions" + } + }, + importMeta: { + syntax: { + name: "@babel/plugin-syntax-import-meta", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta" + } + }, + logicalAssignment: { + syntax: { + name: "@babel/plugin-syntax-logical-assignment-operators", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators" + }, + transform: { + name: "@babel/plugin-transform-logical-assignment-operators", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators" + } + }, + moduleStringNames: { + syntax: { + name: "@babel/plugin-syntax-module-string-names", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names" + } + }, + numericSeparator: { + syntax: { + name: "@babel/plugin-syntax-numeric-separator", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator" + }, + transform: { + name: "@babel/plugin-transform-numeric-separator", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator" + } + }, + nullishCoalescingOperator: { + syntax: { + name: "@babel/plugin-syntax-nullish-coalescing-operator", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator" + }, + transform: { + name: "@babel/plugin-transform-nullish-coalescing-operator", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator" + } + }, + objectRestSpread: { + syntax: { + name: "@babel/plugin-syntax-object-rest-spread", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread" + }, + transform: { + name: "@babel/plugin-transform-object-rest-spread", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread" + } + }, + optionalCatchBinding: { + syntax: { + name: "@babel/plugin-syntax-optional-catch-binding", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding" + }, + transform: { + name: "@babel/plugin-transform-optional-catch-binding", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding" + } + }, + optionalChaining: { + syntax: { + name: "@babel/plugin-syntax-optional-chaining", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining" + }, + transform: { + name: "@babel/plugin-transform-optional-chaining", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining" + } + }, + privateIn: { + syntax: { + name: "@babel/plugin-syntax-private-property-in-object", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object" + }, + transform: { + name: "@babel/plugin-transform-private-property-in-object", + url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object" + } + }, + regexpUnicodeSets: { + syntax: { + name: "@babel/plugin-syntax-unicode-sets-regex", + url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md" + }, + transform: { + name: "@babel/plugin-transform-unicode-sets-regex", + url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md" + } } - } -}; -pluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform; - + }); +} const getNameURLCombination = ({ name, url }) => `${name} (${url})`; - function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { 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) { const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo; - if (syntaxPlugin) { const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - if (transformPlugin) { const transformPluginInfo = getNameURLCombination(transformPlugin); const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets"; @@ -302,6 +322,8 @@ If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section } } } - return helpMessage; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=missing-plugin-helper.js.map diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map new file mode 100644 index 00000000..9e735162 --- /dev/null +++ b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map @@ -0,0 +1 @@ +{"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","importAttributes","pipelineOperator","recordAndTuple","throwExpressions","typescript","Object","assign","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importAssertions","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","regexpUnicodeSets","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n importAttributes: {\n syntax: {\n name: \"@babel/plugin-syntax-import-attributes\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // TODO: This plugins are now supported by default by @babel/parser.\n Object.assign(pluginNameMap, {\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-transform-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-transform-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n },\n },\n // Will be removed\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-transform-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-transform-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-transform-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-transform-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,mCAAmC;MACzCC,GAAG,EAAE;IACP;EACF,CAAC;EACDI,aAAa,EAAE;IACbN,MAAM,EAAE;MACNC,IAAI,EAAE,qCAAqC;MAC3CC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,uCAAuC;MAC7CC,GAAG,EAAE;IACP;EACF,CAAC;EACDK,iBAAiB,EAAE;IACjBP,MAAM,EAAE;MACNC,IAAI,EAAE,0CAA0C;MAChDC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,4CAA4C;MAClDC,GAAG,EAAE;IACP;EACF,CAAC;EACDM,IAAI,EAAE;IACJR,MAAM,EAAE;MACNC,IAAI,EAAE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,CAACS,YAAY,CAAC;MAC5D,IAAIC,eAAe,EAAE;QACnB,MAAME,mBAAmB,GAAGZ,qBAAqB,CAACU,eAAe,CAAC;QAClE,MAAMG,WAAW,GAAGH,eAAe,CAAC9C,IAAI,CAACkD,UAAU,CAAC,eAAe,CAAC,GAChE,SAAS,GACT,SAAS;QACbT,WAAW,IAAK,WAAUO,mBAAoB,YAAWC,WAAY;AAC7E,qCAAqCF,gBAAiB,8CAA6C;MAC7F,CAAC,MAAM;QACLN,WAAW,IACR,WAAUM,gBAAiB,iDAAgD,GAC3E,oBAAmB;MACxB;IACF;EACF;EACA,OAAON,WAAW;AACpB;AAAC"} \ 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 f30372ea..dc67d481 100644 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js +++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js @@ -4,56 +4,57 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; - function helpers() { - const data = _interopRequireWildcard(require("@babel/helpers")); - + const data = require("@babel/helpers"); helpers = function () { return data; }; - return data; } - function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - + const data = require("@babel/generator"); _generator = function () { return data; }; - return data; } - function _template() { - const data = _interopRequireDefault(require("@babel/template")); - + const data = require("@babel/template"); _template = function () { return data; }; - return data; } - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { +function _t() { + const data = require("@babel/types"); + _t = function () { return data; }; - return data; } - -var _file = _interopRequireDefault(require("../transformation/file/file")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const buildUmdWrapper = replacements => (0, _template().default)` +var _file = require("../transformation/file/file"); +const { + arrayExpression, + assignmentExpression, + binaryExpression, + blockStatement, + callExpression, + cloneNode, + conditionalExpression, + exportNamedDeclaration, + exportSpecifier, + expressionStatement, + functionExpression, + identifier, + memberExpression, + objectExpression, + program, + stringLiteral, + unaryExpression, + variableDeclaration, + variableDeclarator +} = _t(); +const buildUmdWrapper = replacements => _template().default.statement` (function (root, factory) { if (typeof define === "function" && define.amd) { define(AMD_ARGUMENTS, factory); @@ -66,56 +67,50 @@ const buildUmdWrapper = replacements => (0, _template().default)` FACTORY_BODY }); `(replacements); - function buildGlobal(allowlist) { - const namespace = t().identifier("babelHelpers"); + const namespace = 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([])))])); + const container = functionExpression(null, [identifier("global")], blockStatement(body)); + const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral("undefined")), identifier("self"), identifier("global"))]))]); + body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))])); buildHelpers(body, namespace, allowlist); return tree; } - function buildModule(allowlist) { const body = []; const refs = buildHelpers(body, null, allowlist); - body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(name => { - return t().exportSpecifier(t().cloneNode(refs[name]), t().identifier(name)); + body.unshift(exportNamedDeclaration(null, Object.keys(refs).map(name => { + return exportSpecifier(cloneNode(refs[name]), identifier(name)); }))); - return t().program(body, [], "module"); + return program(body, [], "module"); } - function buildUmd(allowlist) { - const namespace = t().identifier("babelHelpers"); + const namespace = identifier("babelHelpers"); const body = []; - body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().identifier("global"))])); + body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))])); buildHelpers(body, namespace, allowlist); - return t().program([buildUmdWrapper({ - FACTORY_PARAMETERS: t().identifier("global"), - BROWSER_ARGUMENTS: t().assignmentExpression("=", t().memberExpression(t().identifier("root"), namespace), t().objectExpression([])), - COMMON_ARGUMENTS: t().identifier("exports"), - AMD_ARGUMENTS: t().arrayExpression([t().stringLiteral("exports")]), + return program([buildUmdWrapper({ + FACTORY_PARAMETERS: identifier("global"), + BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])), + COMMON_ARGUMENTS: identifier("exports"), + AMD_ARGUMENTS: arrayExpression([stringLiteral("exports")]), FACTORY_BODY: body, - UMD_ROOT: t().identifier("this") + UMD_ROOT: identifier("this") })]); } - function buildVar(allowlist) { - const namespace = t().identifier("babelHelpers"); + const namespace = identifier("babelHelpers"); const body = []; - body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().objectExpression([]))])); - const tree = t().program(body); + body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))])); + const tree = program(body); buildHelpers(body, namespace, allowlist); - body.push(t().expressionStatement(namespace)); + body.push(expressionStatement(namespace)); return tree; } - function buildHelpers(body, namespace, allowlist) { const getHelperReference = name => { - return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier(`_${name}`); + return namespace ? memberExpression(namespace, identifier(name)) : identifier(`_${name}`); }; - const refs = {}; helpers().list.forEach(function (name) { if (allowlist && allowlist.indexOf(name) < 0) return; @@ -128,7 +123,6 @@ function buildHelpers(body, namespace, allowlist) { }); return refs; } - function _default(allowlist, outputType = "global") { let tree; const build = { @@ -137,12 +131,13 @@ function _default(allowlist, outputType = "global") { umd: buildUmd, var: buildVar }[outputType]; - if (build) { tree = build(allowlist); } else { throw new Error(`Unsupported output type ${outputType}`); } - return (0, _generator().default)(tree).code; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=build-external-helpers.js.map diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js.map b/node_modules/@babel/core/lib/tools/build-external-helpers.js.map new file mode 100644 index 00000000..a96ff2bb --- /dev/null +++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js.map @@ -0,0 +1 @@ +{"version":3,"names":["helpers","data","require","_generator","_template","_t","_file","arrayExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","cloneNode","conditionalExpression","exportNamedDeclaration","exportSpecifier","expressionStatement","functionExpression","identifier","memberExpression","objectExpression","program","stringLiteral","unaryExpression","variableDeclaration","variableDeclarator","buildUmdWrapper","replacements","template","statement","buildGlobal","allowlist","namespace","body","container","tree","push","buildHelpers","buildModule","refs","unshift","Object","keys","map","name","buildUmd","FACTORY_PARAMETERS","BROWSER_ARGUMENTS","COMMON_ARGUMENTS","AMD_ARGUMENTS","FACTORY_BODY","UMD_ROOT","buildVar","getHelperReference","list","forEach","indexOf","ref","ensure","File","nodes","get","_default","outputType","build","global","module","umd","var","Error","generator","code"],"sources":["../../src/tools/build-external-helpers.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport File from \"../transformation/file/file\";\nimport type { PublicReplacements } from \"@babel/template/src/options\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: PublicReplacements) =>\n template.statement`\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 `(replacements);\n\nfunction buildGlobal(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: Array) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: Array) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: Array,\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: Array,\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: Array,\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: { [key: string]: t.Identifier | t.MemberExpression } = {};\n helpers.list.forEach(function (name) {\n if (allowlist && allowlist.indexOf(name) < 0) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n helpers.ensure(name, File);\n const { nodes } = helpers.get(name, getHelperReference, ref);\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: Array,\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree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,oBAAS,EAACnC,IAAI,CAAC,CAACoC,IAAI;AAC7B;AAAC"} \ 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 134844b9..ac9819b7 100644 --- a/node_modules/@babel/core/lib/transform-ast.js +++ b/node_modules/@babel/core/lib/transform-ast.js @@ -3,38 +3,49 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformFromAstAsync = exports.transformFromAstSync = exports.transformFromAst = void 0; - -var _config = _interopRequireDefault(require("./config")); - +exports.transformFromAst = void 0; +exports.transformFromAstAsync = transformFromAstAsync; +exports.transformFromAstSync = transformFromAstSync; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _config = require("./config"); var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const gensync = require("gensync"); - -const transformFromAstRunner = gensync(function* (ast, code, opts) { +var _rewriteStackTrace = require("./errors/rewrite-stack-trace"); +const transformFromAstRunner = _gensync()(function* (ast, code, opts) { const config = yield* (0, _config.default)(opts); if (config === null) return null; if (!ast) throw new Error("No AST given"); return yield* (0, _transformation.run)(config, code, ast); }); - -const transformFromAst = function transformFromAst(ast, code, opts, callback) { - if (typeof opts === "function") { - callback = opts; +const transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) { + let opts; + let callback; + if (typeof optsOrCallback === "function") { + callback = optsOrCallback; opts = undefined; + } else { + opts = optsOrCallback; + callback = maybeCallback; } - if (callback === undefined) { - return transformFromAstRunner.sync(ast, code, opts); + { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code, opts); + } } - - transformFromAstRunner.errback(ast, code, opts, callback); + (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback); }; - exports.transformFromAst = transformFromAst; -const transformFromAstSync = transformFromAstRunner.sync; -exports.transformFromAstSync = transformFromAstSync; -const transformFromAstAsync = transformFromAstRunner.async; -exports.transformFromAstAsync = transformFromAstAsync; \ No newline at end of file +function transformFromAstSync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args); +} +function transformFromAstAsync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args); +} +0 && 0; + +//# sourceMappingURL=transform-ast.js.map diff --git a/node_modules/@babel/core/lib/transform-ast.js.map b/node_modules/@babel/core/lib/transform-ast.js.map new file mode 100644 index 00000000..c1ecfaf0 --- /dev/null +++ b/node_modules/@babel/core/lib/transform-ast.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_config","_transformation","_rewriteStackTrace","transformFromAstRunner","gensync","ast","code","opts","config","loadConfig","Error","run","transformFromAst","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","exports","transformFromAstSync","args","transformFromAstAsync","async"],"sources":["../src/transform-ast.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,kBAAA,GAAAH,OAAA;AAgBA,MAAMI,sBAAsB,GAAGC,SAAMA,CAAC,CAAC,WACrCC,GAAY,EACZC,IAAY,EACZC,IAAqC,EACT;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,IAAI,CAACH,GAAG,EAAE,MAAM,IAAIK,KAAK,CAAC,cAAc,CAAC;EAEzC,OAAO,OAAO,IAAAC,mBAAG,EAACH,MAAM,EAAEF,IAAI,EAAED,GAAG,CAAC;AACtC,CAAC,CAAC;AAEK,MAAMO,gBAAkC,GAAG,SAASA,gBAAgBA,CACzEP,GAAG,EACHC,IAAI,EACJO,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIP,IAAqC;EACzC,IAAIQ,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBN,IAAI,GAAGS,SAAS;EAClB,CAAC,MAAM;IACLT,IAAI,GAAGM,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACd,sBAAsB,CAACe,IAAI,CAAC,CAACb,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;IAC3E;EACF;EAEA,IAAAU,uCAAoB,EAACd,sBAAsB,CAACgB,OAAO,CAAC,CAClDd,GAAG,EACHC,IAAI,EACJC,IAAI,EACJQ,QACF,CAAC;AACH,CAAC;AAACK,OAAA,CAAAR,gBAAA,GAAAA,gBAAA;AAEK,SAASS,oBAAoBA,CAClC,GAAGC,IAAoD,EACvD;EACA,OAAO,IAAAL,uCAAoB,EAACd,sBAAsB,CAACe,IAAI,CAAC,CAAC,GAAGI,IAAI,CAAC;AACnE;AAEO,SAASC,qBAAqBA,CACnC,GAAGD,IAAqD,EACxD;EACA,OAAO,IAAAL,uCAAoB,EAACd,sBAAsB,CAACqB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACpE;AAAC"} \ 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 6442c982..f81925ad 100644 --- a/node_modules/@babel/core/lib/transform-file-browser.js +++ b/node_modules/@babel/core/lib/transform-file-browser.js @@ -3,24 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformFileSync = transformFileSync; -exports.transformFileAsync = transformFileAsync; exports.transformFile = void 0; - +exports.transformFileAsync = transformFileAsync; +exports.transformFileSync = transformFileSync; 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 +} +0 && 0; + +//# sourceMappingURL=transform-file-browser.js.map diff --git a/node_modules/@babel/core/lib/transform-file-browser.js.map b/node_modules/@babel/core/lib/transform-file-browser.js.map new file mode 100644 index 00000000..8a44fb75 --- /dev/null +++ b/node_modules/@babel/core/lib/transform-file-browser.js.map @@ -0,0 +1 @@ +{"version":3,"names":["transformFile","filename","opts","callback","Error","exports","transformFileSync","transformFileAsync","Promise","reject"],"sources":["../src/transform-file-browser.ts"],"sourcesContent":["// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n"],"mappings":";;;;;;;;AAUO,MAAMA,aAA4B,GAAG,SAASA,aAAaA,CAChEC,QAAQ,EACRC,IAAI,EACJC,QAA6C,EAC7C;EACA,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IAC9BC,QAAQ,GAAGD,IAAI;EACjB;EAEAC,QAAQ,CAAC,IAAIC,KAAK,CAAC,iDAAiD,CAAC,EAAE,IAAI,CAAC;AAC9E,CAAC;AAACC,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEK,SAASM,iBAAiBA,CAAA,EAAU;EACzC,MAAM,IAAIF,KAAK,CAAC,iDAAiD,CAAC;AACpE;AAEO,SAASG,kBAAkBA,CAAA,EAAG;EACnC,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIL,KAAK,CAAC,iDAAiD,CAC7D,CAAC;AACH;AAAC"} \ 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 7d3662ce..d08a85f9 100644 --- a/node_modules/@babel/core/lib/transform-file.js +++ b/node_modules/@babel/core/lib/transform-file.js @@ -3,24 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0; - -var _config = _interopRequireDefault(require("./config")); - +exports.transformFile = transformFile; +exports.transformFileAsync = transformFileAsync; +exports.transformFileSync = transformFileSync; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _config = require("./config"); var _transformation = require("./transformation"); - -var fs = _interopRequireWildcard(require("./gensync-utils/fs")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const gensync = require("gensync"); - +var fs = require("./gensync-utils/fs"); ({}); -const transformFileRunner = gensync(function* (filename, opts) { +const transformFileRunner = _gensync()(function* (filename, opts) { const options = Object.assign({}, opts, { filename }); @@ -29,9 +26,15 @@ const transformFileRunner = gensync(function* (filename, opts) { const code = yield* fs.readFile(filename, "utf8"); return yield* (0, _transformation.run)(config, code); }); -const transformFile = transformFileRunner.errback; -exports.transformFile = transformFile; -const transformFileSync = transformFileRunner.sync; -exports.transformFileSync = transformFileSync; -const transformFileAsync = transformFileRunner.async; -exports.transformFileAsync = transformFileAsync; \ No newline at end of file +function transformFile(...args) { + transformFileRunner.errback(...args); +} +function transformFileSync(...args) { + return transformFileRunner.sync(...args); +} +function transformFileAsync(...args) { + return transformFileRunner.async(...args); +} +0 && 0; + +//# sourceMappingURL=transform-file.js.map diff --git a/node_modules/@babel/core/lib/transform-file.js.map b/node_modules/@babel/core/lib/transform-file.js.map new file mode 100644 index 00000000..af99a13a --- /dev/null +++ b/node_modules/@babel/core/lib/transform-file.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_config","_transformation","fs","transformFileRunner","gensync","filename","opts","options","Object","assign","config","loadConfig","code","readFile","run","transformFile","args","errback","transformFileSync","sync","transformFileAsync","async"],"sources":["../src/transform-file.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport * as fs from \"./gensync-utils/fs\";\n\ntype transformFileBrowserType = typeof import(\"./transform-file-browser\");\ntype transformFileType = typeof import(\"./transform-file\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of transform-file-browser, since this file may be replaced at bundle time with\n// transform-file-browser.\n({}) as any as transformFileBrowserType as transformFileType;\n\nconst transformFileRunner = gensync(function* (\n filename: string,\n opts?: InputOptions,\n): Handler {\n const options = { ...opts, filename };\n\n const config: ResolvedConfig | null = yield* loadConfig(options);\n if (config === null) return null;\n\n const code = yield* fs.readFile(filename, \"utf8\");\n return yield* run(config, code);\n});\n\n// @ts-expect-error TS doesn't detect that this signature is compatible\nexport function transformFile(\n filename: string,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n filename: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n ...args: Parameters\n) {\n transformFileRunner.errback(...args);\n}\n\nexport function transformFileSync(\n ...args: Parameters\n) {\n return transformFileRunner.sync(...args);\n}\nexport function transformFileAsync(\n ...args: Parameters\n) {\n return transformFileRunner.async(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAH,OAAA;AAQA,CAAC,CAAC,CAAC;AAEH,MAAMI,mBAAmB,GAAGC,SAAMA,CAAC,CAAC,WAClCC,QAAgB,EAChBC,IAAmB,EACS;EAC5B,MAAMC,OAAO,GAAAC,MAAA,CAAAC,MAAA,KAAQH,IAAI;IAAED;EAAQ,EAAE;EAErC,MAAMK,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACJ,OAAO,CAAC;EAChE,IAAIG,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,MAAME,IAAI,GAAG,OAAOV,EAAE,CAACW,QAAQ,CAACR,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,OAAO,IAAAS,mBAAG,EAACJ,MAAM,EAAEE,IAAI,CAAC;AACjC,CAAC,CAAC;AAYK,SAASG,aAAaA,CAC3B,GAAGC,IAAoD,EACvD;EACAb,mBAAmB,CAACc,OAAO,CAAC,GAAGD,IAAI,CAAC;AACtC;AAEO,SAASE,iBAAiBA,CAC/B,GAAGF,IAAiD,EACpD;EACA,OAAOb,mBAAmB,CAACgB,IAAI,CAAC,GAAGH,IAAI,CAAC;AAC1C;AACO,SAASI,kBAAkBA,CAChC,GAAGJ,IAAkD,EACrD;EACA,OAAOb,mBAAmB,CAACkB,KAAK,CAAC,GAAGL,IAAI,CAAC;AAC3C;AAAC"} \ 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 77333396..e523a533 100644 --- a/node_modules/@babel/core/lib/transform.js +++ b/node_modules/@babel/core/lib/transform.js @@ -3,34 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformAsync = exports.transformSync = exports.transform = void 0; - -var _config = _interopRequireDefault(require("./config")); - +exports.transform = void 0; +exports.transformAsync = transformAsync; +exports.transformSync = transformSync; +function _gensync() { + const data = require("gensync"); + _gensync = function () { + return data; + }; + return data; +} +var _config = require("./config"); var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const gensync = require("gensync"); - -const transformRunner = gensync(function* transform(code, opts) { +var _rewriteStackTrace = require("./errors/rewrite-stack-trace"); +const transformRunner = _gensync()(function* transform(code, opts) { const config = yield* (0, _config.default)(opts); if (config === null) return null; return yield* (0, _transformation.run)(config, code); }); - -const transform = function transform(code, opts, callback) { - if (typeof opts === "function") { - callback = opts; +const transform = function transform(code, optsOrCallback, maybeCallback) { + let opts; + let callback; + if (typeof optsOrCallback === "function") { + callback = optsOrCallback; opts = undefined; + } else { + opts = optsOrCallback; + callback = maybeCallback; } - - if (callback === undefined) return transformRunner.sync(code, opts); - transformRunner.errback(code, opts, callback); + if (callback === undefined) { + { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code, opts); + } + } + (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code, opts, callback); }; - exports.transform = transform; -const transformSync = transformRunner.sync; -exports.transformSync = transformSync; -const transformAsync = transformRunner.async; -exports.transformAsync = transformAsync; \ No newline at end of file +function transformSync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args); +} +function transformAsync(...args) { + return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args); +} +0 && 0; + +//# sourceMappingURL=transform.js.map diff --git a/node_modules/@babel/core/lib/transform.js.map b/node_modules/@babel/core/lib/transform.js.map new file mode 100644 index 00000000..dbe9a5ac --- /dev/null +++ b/node_modules/@babel/core/lib/transform.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_gensync","data","require","_config","_transformation","_rewriteStackTrace","transformRunner","gensync","transform","code","opts","config","loadConfig","run","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","exports","transformSync","args","transformAsync","async"],"sources":["../src/transform.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config\";\nimport type { InputOptions, ResolvedConfig } from \"./config\";\nimport { run } from \"./transformation\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace\";\n\nexport type { FileResult } from \"./transformation\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,kBAAA,GAAAH,OAAA;AAcA,MAAMI,eAAe,GAAGC,SAAMA,CAAC,CAAC,UAAUC,SAASA,CACjDC,IAAY,EACZC,IAAmB,EACS;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,eAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,OAAO,OAAO,IAAAE,mBAAG,EAACF,MAAM,EAAEF,IAAI,CAAC;AACjC,CAAC,CAAC;AAEK,MAAMD,SAAoB,GAAG,SAASA,SAASA,CACpDC,IAAI,EACJK,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIL,IAAqC;EACzC,IAAIM,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBJ,IAAI,GAAGO,SAAS;EAClB,CAAC,MAAM;IACLP,IAAI,GAAGI,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IAKnB;MAIL,OAAO,IAAAC,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAACV,IAAI,EAAEC,IAAI,CAAC;IAC/D;EACF;EAEA,IAAAQ,uCAAoB,EAACZ,eAAe,CAACc,OAAO,CAAC,CAACX,IAAI,EAAEC,IAAI,EAAEM,QAAQ,CAAC;AACrE,CAAC;AAACK,OAAA,CAAAb,SAAA,GAAAA,SAAA;AAEK,SAASc,aAAaA,CAC3B,GAAGC,IAA6C,EAChD;EACA,OAAO,IAAAL,uCAAoB,EAACZ,eAAe,CAACa,IAAI,CAAC,CAAC,GAAGI,IAAI,CAAC;AAC5D;AACO,SAASC,cAAcA,CAC5B,GAAGD,IAA8C,EACjD;EACA,OAAO,IAAAL,uCAAoB,EAACZ,eAAe,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AAC7D;AAAC"} \ 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 6f64c68a..d0ac93f3 100644 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js @@ -4,88 +4,74 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = loadBlockHoistPlugin; - -var _config = _interopRequireDefault(require("../config")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +function _traverse() { + const data = require("@babel/traverse"); + _traverse = function () { + return data; + }; + return data; +} +var _plugin = require("../config/plugin"); let LOADED_PLUGIN; - +const blockHoistPlugin = { + name: "internal.blockHoist", + visitor: { + Block: { + exit({ + node + }) { + const { + body + } = node; + let max = Math.pow(2, 30) - 1; + let hasChange = false; + for (let i = 0; i < body.length; i++) { + const n = body[i]; + const p = priority(n); + if (p > max) { + hasChange = true; + break; + } + max = p; + } + if (!hasChange) return; + node.body = stableSort(body.slice()); + } + } + } +}; function loadBlockHoistPlugin() { if (!LOADED_PLUGIN) { - const config = _config.default.sync({ - babelrc: false, - configFile: false, - plugins: [blockHoistPlugin] - }); - - LOADED_PLUGIN = config ? config.passes[0][0] : undefined; - if (!LOADED_PLUGIN) throw new Error("Assertion failure"); + LOADED_PLUGIN = new _plugin.default(Object.assign({}, blockHoistPlugin, { + visitor: _traverse().default.explode(blockHoistPlugin.visitor) + }), {}); } - return LOADED_PLUGIN; } - function priority(bodyNode) { const priority = bodyNode == null ? void 0 : bodyNode._blockHoist; if (priority == null) return 1; if (priority === true) return 2; return priority; } - function stableSort(body) { const buckets = Object.create(null); - for (let i = 0; i < body.length; i++) { const n = body[i]; const p = priority(n); const bucket = buckets[p] || (buckets[p] = []); bucket.push(n); } - const keys = Object.keys(buckets).map(k => +k).sort((a, b) => b - a); let index = 0; - for (const key of keys) { const bucket = buckets[key]; - for (const n of bucket) { body[index++] = n; } } - return body; } +0 && 0; -const blockHoistPlugin = { - name: "internal.blockHoist", - visitor: { - Block: { - exit({ - node - }) { - const { - body - } = node; - let max = Math.pow(2, 30) - 1; - let hasChange = false; - - for (let i = 0; i < body.length; i++) { - const n = body[i]; - const p = priority(n); - - if (p > max) { - hasChange = true; - break; - } - - max = p; - } - - if (!hasChange) return; - node.body = stableSort(body.slice()); - } - - } - } -}; \ No newline at end of file +//# sourceMappingURL=block-hoist-plugin.js.map diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map new file mode 100644 index 00000000..01b320da --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_traverse","data","require","_plugin","LOADED_PLUGIN","blockHoistPlugin","name","visitor","Block","exit","node","body","max","Math","pow","hasChange","i","length","n","p","priority","stableSort","slice","loadBlockHoistPlugin","Plugin","Object","assign","traverse","explode","bodyNode","_blockHoist","buckets","create","bucket","push","keys","map","k","sort","a","b","index","key"],"sources":["../../src/transformation/block-hoist-plugin.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config\";\nimport Plugin from \"../config/plugin\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n const { body } = node;\n\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return;\n\n // My kingdom for a stable sort!\n node.body = stableSort(body.slice());\n },\n },\n },\n};\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[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core/lib/transformation/file/file.js index cf32c44c..eea4fd4b 100644 --- a/node_modules/@babel/core/lib/transformation/file/file.js +++ b/node_modules/@babel/core/lib/transformation/file/file.js @@ -4,75 +4,61 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - function helpers() { - const data = _interopRequireWildcard(require("@babel/helpers")); - + const data = require("@babel/helpers"); helpers = function () { return data; }; - return data; } - function _traverse() { - const data = _interopRequireWildcard(require("@babel/traverse")); - + const data = require("@babel/traverse"); _traverse = function () { return data; }; - return data; } - function _codeFrame() { const data = require("@babel/code-frame"); - _codeFrame = function () { return data; }; - return data; } - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { +function _t() { + const data = require("@babel/types"); + _t = function () { return data; }; - return data; } - function _helperModuleTransforms() { const data = require("@babel/helper-module-transforms"); - _helperModuleTransforms = function () { return data; }; - return data; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const semver = require("semver"); - +function _semver() { + const data = require("semver"); + _semver = function () { + return data; + }; + return data; +} +const { + cloneNode, + interpreterDirective +} = _t(); const errorVisitor = { enter(path, state) { const loc = path.node.loc; - if (loc) { state.loc = loc; path.stop(); } } - }; - class File { constructor(options, { code, @@ -82,12 +68,12 @@ class File { this._map = new Map(); this.opts = void 0; this.declarations = {}; - this.path = null; - this.ast = {}; + this.path = void 0; + this.ast = void 0; this.scope = void 0; this.metadata = {}; this.code = ""; - this.inputMap = null; + this.inputMap = void 0; this.hub = { file: this, getCode: () => this.code, @@ -108,79 +94,63 @@ class File { }).setContext(); this.scope = this.path.scope; } - get shebang() { const { interpreter } = this.path.node; return interpreter ? interpreter.value : ""; } - set shebang(value) { if (value) { - this.path.get("interpreter").replaceWith(t().interpreterDirective(value)); + this.path.get("interpreter").replaceWith(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()'."); } - this._map.set(key, val); } - get(key) { return this._map.get(key); } - has(key) { return this._map.has(key); } - getModuleName() { return (0, _helperModuleTransforms().getModuleName)(this.opts, this.opts); } - 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'."); } - availableHelper(name, versionRange) { let minVersion; - try { minVersion = helpers().minVersion(name); } catch (err) { if (err.code !== "BABEL_HELPER_UNKNOWN") throw err; return false; } - if (typeof versionRange !== "string") return true; - if (semver.valid(versionRange)) versionRange = `^${versionRange}`; - return !semver.intersects(`<${minVersion}`, versionRange) && !semver.intersects(`>=8.0.0`, versionRange); + if (_semver().valid(versionRange)) versionRange = `^${versionRange}`; + return !_semver().intersects(`<${minVersion}`, versionRange) && !_semver().intersects(`>=8.0.0`, versionRange); } - addHelper(name) { const declar = this.declarations[name]; - if (declar) return t().cloneNode(declar); + if (declar) return cloneNode(declar); const generator = this.get("helperGenerator"); - if (generator) { const res = generator(name); if (res) return res; } - helpers().ensure(name, File); const uid = this.declarations[name] = this.scope.generateUidIdentifier(name); const dependencies = {}; - for (const dep of helpers().getDependencies(name)) { dependencies[dep] = this.addHelper(dep); } - const { nodes, globals @@ -200,14 +170,11 @@ class File { }); return uid; } - addTemplateObject() { throw new Error("This function has been moved into the template literal transform itself."); } - - buildCodeFrameError(node, msg, Error = SyntaxError) { + buildCodeFrameError(node, msg, _Error = SyntaxError) { let loc = node && (node.loc || node._loc); - if (!loc && node) { const state = { loc: null @@ -218,7 +185,6 @@ class File { if (loc) txt += " Location has been estimated."; msg += ` (${txt})`; } - if (loc) { const { highlightCode = true @@ -236,10 +202,10 @@ class File { highlightCode }); } - - return new Error(msg); + return new _Error(msg); } - } +exports.default = File; +0 && 0; -exports.default = File; \ No newline at end of file +//# sourceMappingURL=file.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/file.js.map b/node_modules/@babel/core/lib/transformation/file/file.js.map new file mode 100644 index 00000000..8b89b987 --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/file/file.js.map @@ -0,0 +1 @@ +{"version":3,"names":["helpers","data","require","_traverse","_codeFrame","_t","_helperModuleTransforms","_semver","cloneNode","interpreterDirective","errorVisitor","enter","path","state","loc","node","stop","File","constructor","options","code","ast","inputMap","_map","Map","opts","declarations","scope","metadata","hub","file","getCode","getScope","addHelper","bind","buildError","buildCodeFrameError","NodePath","get","parentPath","parent","container","key","setContext","shebang","interpreter","value","replaceWith","remove","set","val","Error","has","getModuleName","addImport","availableHelper","name","versionRange","minVersion","err","semver","valid","intersects","declar","generator","res","ensure","uid","generateUidIdentifier","dependencies","dep","getDependencies","nodes","globals","Object","keys","getAllBindings","forEach","hasBinding","rename","_compact","unshiftContainer","indexOf","isVariableDeclaration","registerDeclaration","addTemplateObject","msg","_Error","SyntaxError","_loc","traverse","txt","highlightCode","codeFrameColumns","start","line","column","end","undefined","exports","default"],"sources":["../../../src/transformation/file/file.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Visitor, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport traverse from \"@babel/traverse\";\nimport { cloneNode, interpreterDirective } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { getModuleName } from \"@babel/helper-module-transforms\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file\";\n\nconst errorVisitor: Visitor<{ loc: NodeLocation[\"loc\"] | null }> = {\n enter(path, state) {\n const loc = path.node.loc;\n if (loc) {\n state.loc = loc;\n path.stop();\n }\n },\n};\n\nexport type NodeLocation = {\n loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n _loc?: {\n end?: {\n line: number;\n column: number;\n };\n start: {\n line: number;\n column: number;\n };\n };\n};\n\nexport default class File {\n _map: Map = new Map();\n opts: { [key: string]: any };\n declarations: { [key: string]: t.Identifier } = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: { [key: string]: any } = {};\n code: string = \"\";\n inputMap: any;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(options: {}, { code, ast, inputMap }: NormalizedFile) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n getModuleName(): string | undefined | null {\n return getModuleName(this.opts, this.opts);\n }\n\n addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n\n addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.ensure(name, File);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: { [key: string]: t.Identifier } = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this.addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n this.path.get(\"body\").forEach(path => {\n if (nodes.indexOf(path.node) === -1) return;\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n });\n\n return uid;\n }\n\n addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node && (node.loc || node._loc);\n\n if (!loc && node) {\n const state: { loc?: NodeLocation[\"loc\"] | null } = {\n loc: null,\n };\n traverse(node as t.Node, errorVisitor, this.scope, state);\n loc = state.loc;\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {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QAClDC,GAAG,EAAE;MACP,CAAC;MACD,IAAA4E,mBAAQ,EAAC3E,IAAI,EAAYL,YAAY,EAAE,IAAI,CAACiB,KAAK,EAAEd,KAAK,CAAC;MACzDC,GAAG,GAAGD,KAAK,CAACC,GAAG;MAEf,IAAI6E,GAAG,GACL,mEAAmE;MACrE,IAAI7E,GAAG,EAAE6E,GAAG,IAAI,+BAA+B;MAE/CL,GAAG,IAAK,KAAIK,GAAI,GAAE;IACpB;IAEA,IAAI7E,GAAG,EAAE;MACP,MAAM;QAAE8E,aAAa,GAAG;MAAK,CAAC,GAAG,IAAI,CAACnE,IAAI;MAE1C6D,GAAG,IACD,IAAI,GACJ,IAAAO,6BAAgB,EACd,IAAI,CAACzE,IAAI,EACT;QACE0E,KAAK,EAAE;UACLC,IAAI,EAAEjF,GAAG,CAACgF,KAAK,CAACC,IAAI;UACpBC,MAAM,EAAElF,GAAG,CAACgF,KAAK,CAACE,MAAM,GAAG;QAC7B,CAAC;QACDC,GAAG,EACDnF,GAAG,CAACmF,GAAG,IAAInF,GAAG,CAACgF,KAAK,CAACC,IAAI,KAAKjF,GAAG,CAACmF,GAAG,CAACF,IAAI,GACtC;UACEA,IAAI,EAAEjF,GAAG,CAACmF,GAAG,CAACF,IAAI;UAClBC,MAAM,EAAElF,GAAG,CAACmF,GAAG,CAACD,MAAM,GAAG;QAC3B,CAAC,GACDE;MACR,CAAC,EACD;QAAEN;MAAc,CAClB,CAAC;IACL;IAEA,OAAO,IAAIL,MAAM,CAACD,GAAG,CAAC;EACxB;AACF;AAACa,OAAA,CAAAC,OAAA,GAAAnF,IAAA;AAAA"} \ 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 a1b9eee9..351bc0b2 100644 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ b/node_modules/@babel/core/lib/transformation/file/generate.js @@ -4,23 +4,21 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = generateCode; - +function _convertSourceMap() { + const data = require("convert-source-map"); + _convertSourceMap = function () { + return data; + }; + return data; +} function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - + const data = require("@babel/generator"); _generator = function () { return data; }; - return data; } - -var _mergeMap = _interopRequireDefault(require("./merge-map")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const convertSourceMap = require("convert-source-map"); - +var _mergeMap = require("./merge-map"); function generateCode(pluginPasses, file) { const { opts, @@ -28,54 +26,59 @@ function generateCode(pluginPasses, file) { code, inputMap } = file; + const { + generatorOpts + } = opts; + generatorOpts.inputSourceMap = inputMap == null ? void 0 : inputMap.toObject(); const results = []; - for (const plugins of pluginPasses) { for (const plugin of plugins) { const { generatorOverride } = plugin; - if (generatorOverride) { - const result = generatorOverride(ast, opts.generatorOpts, code, _generator().default); + const result = generatorOverride(ast, generatorOpts, code, _generator().default); if (result !== undefined) results.push(result); } } } - let result; - if (results.length === 0) { - result = (0, _generator().default)(ast, opts.generatorOpts, code); + result = (0, _generator().default)(ast, generatorOpts, code); } else if (results.length === 1) { result = results[0]; - if (typeof result.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.`); } } else { throw new Error("More than one plugin attempted to override codegen."); } - let { code: outputCode, - map: outputMap + decodedMap: outputMap = result.map } = result; - - if (outputMap && inputMap) { - outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap); + if (result.__mergedMap) { + outputMap = Object.assign({}, result.map); + } else { + if (outputMap) { + if (inputMap) { + outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName); + } else { + outputMap = result.map; + } + } } - if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { - outputCode += "\n" + convertSourceMap.fromObject(outputMap).toComment(); + outputCode += "\n" + _convertSourceMap().fromObject(outputMap).toComment(); } - if (opts.sourceMaps === "inline") { outputMap = null; } - return { outputCode, outputMap }; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=generate.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js.map b/node_modules/@babel/core/lib/transformation/file/generate.js.map new file mode 100644 index 00000000..dd574381 --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/file/generate.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_convertSourceMap","data","require","_generator","_mergeMap","generateCode","pluginPasses","file","opts","ast","code","inputMap","generatorOpts","inputSourceMap","toObject","results","plugins","plugin","generatorOverride","result","generate","undefined","push","length","then","Error","outputCode","decodedMap","outputMap","map","__mergedMap","Object","assign","mergeSourceMap","sourceFileName","sourceMaps","convertSourceMap","fromObject","toComment"],"sources":["../../../src/transformation/file/generate.ts"],"sourcesContent":["import type { PluginPasses } from \"../../config\";\nimport convertSourceMap from \"convert-source-map\";\ntype SourceMap = any;\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file\";\nimport mergeSourceMap from \"./merge-map\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: SourceMap | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n return { outputCode, outputMap };\n}\n"],"mappings":";;;;;;AACA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAG,SAAA,GAAAF,OAAA;AAEe,SAASG,YAAYA,CAClCC,YAA0B,EAC1BC,IAAU,EAIV;EACA,MAAM;IAAEC,IAAI;IAAEC,GAAG;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAGJ,IAAI;EAC1C,MAAM;IAAEK;EAAc,CAAC,GAAGJ,IAAI;EAE9BI,aAAa,CAACC,cAAc,GAAGF,QAAQ,oBAARA,QAAQ,CAAEG,QAAQ,CAAC,CAAC;EAEnD,MAAMC,OAAO,GAAG,EAAE;EAClB,KAAK,MAAMC,OAAO,IAAIV,YAAY,EAAE;IAClC,KAAK,MAAMW,MAAM,IAAID,OAAO,EAAE;MAC5B,MAAM;QAAEE;MAAkB,CAAC,GAAGD,MAAM;MACpC,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AC2B,UAAU,KAAK,MAAM,EAAE;IAC9DT,UAAU,IAAI,IAAI,GAAGU,kBAAeA,CAAC,CAACC,UAAU,CAACT,SAAS,CAAC,CAACU,SAAS,CAAC,CAAC;EACzE;EAEA,IAAI9B,IAAI,CAAC2B,UAAU,KAAK,QAAQ,EAAE;IAChCP,SAAS,GAAG,IAAI;EAClB;EAEA,OAAO;IAAEF,UAAU;IAAEE;EAAU,CAAC;AAClC;AAAC"} \ 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 index f2ab18be..cf3971b2 100644 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js +++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js @@ -4,234 +4,34 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = mergeSourceMap; - -const sourceMap = require("source-map"); - -function mergeSourceMap(inputMap, map) { - const input = buildMappingData(inputMap); - const output = buildMappingData(map); - const mergedGenerator = new sourceMap.SourceMapGenerator(); - - for (const { - source - } of input.sources) { - 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 { - generated - } of overlappingOriginal) { - for (const item of generated) { - callback(item); - } - } +function _remapping() { + const data = require("@ampproject/remapping"); + _remapping = function () { + return data; + }; + return data; } - -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 mergeSourceMap(inputMap, map, sourceFileName) { + const source = sourceFileName.replace(/\\/g, "/"); + let found = false; + const result = _remapping()(rootless(map), (s, ctx) => { + if (s === source && !found) { + found = true; + ctx.source = ""; + return rootless(inputMap); + } + return null; }); -} - -function eachInputGeneratedRange(map, callback) { - for (const { - source, - mappings - } of map.sources) { - for (const { - original, - generated - } of mappings) { - for (const item of generated) { - callback(item, original, source); - } - } + if (typeof inputMap.sourceRoot === "string") { + result.sourceRoot = inputMap.sourceRoot; } + return Object.assign({}, result); } - -function buildMappingData(map) { - const consumer = new sourceMap.SourceMapConsumer(Object.assign({}, map, { +function rootless(map) { + return 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.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; + }); } +0 && 0; -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 +//# sourceMappingURL=merge-map.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js.map b/node_modules/@babel/core/lib/transformation/file/merge-map.js.map new file mode 100644 index 00000000..d2877a3f --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_remapping","data","require","mergeSourceMap","inputMap","map","sourceFileName","source","replace","found","result","remapping","rootless","s","ctx","sourceRoot","Object","assign"],"sources":["../../../src/transformation/file/merge-map.ts"],"sourcesContent":["type SourceMap = any;\nimport remapping from \"@ampproject/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEe,SAASE,cAAcA,CACpCC,QAAmB,EACnBC,GAAc,EACdC,cAAsB,EACX;EAOX,MAAMC,MAAM,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAMjD,IAAIC,KAAK,GAAG,KAAK;EACjB,MAAMC,MAAM,GAAGC,WAAQA,CAAC,CAACC,QAAQ,CAACP,GAAG,CAAC,EAAE,CAACQ,CAAC,EAAEC,GAAG,KAAK;IAClD,IAAID,CAAC,KAAKN,MAAM,IAAI,CAACE,KAAK,EAAE;MAC1BA,KAAK,GAAG,IAAI;MAMZK,GAAG,CAACP,MAAM,GAAG,EAAE;MAEf,OAAOK,QAAQ,CAACR,QAAQ,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb,CAAC,CAAC;EAEF,IAAI,OAAOA,QAAQ,CAACW,UAAU,KAAK,QAAQ,EAAE;IAC3CL,MAAM,CAACK,UAAU,GAAGX,QAAQ,CAACW,UAAU;EACzC;EAOA,OAAAC,MAAA,CAAAC,MAAA,KAAYP,MAAM;AACpB;AAEA,SAASE,QAAQA,CAACP,GAAc,EAAa;EAC3C,OAAAW,MAAA,CAAAC,MAAA,KACKZ,GAAG;IAKNU,UAAU,EAAE;EAAI;AAEpB;AAAC"} \ 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 bb35bbe0..e748199a 100644 --- a/node_modules/@babel/core/lib/transformation/index.js +++ b/node_modules/@babel/core/lib/transformation/index.js @@ -4,49 +4,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.run = run; - function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - + const data = require("@babel/traverse"); _traverse = function () { return data; }; - return data; } - -var _pluginPass = _interopRequireDefault(require("./plugin-pass")); - -var _blockHoistPlugin = _interopRequireDefault(require("./block-hoist-plugin")); - -var _normalizeOpts = _interopRequireDefault(require("./normalize-opts")); - -var _normalizeFile = _interopRequireDefault(require("./normalize-file")); - -var _generate = _interopRequireDefault(require("./file/generate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _pluginPass = require("./plugin-pass"); +var _blockHoistPlugin = require("./block-hoist-plugin"); +var _normalizeOpts = require("./normalize-opts"); +var _normalizeFile = require("./normalize-file"); +var _generate = require("./file/generate"); +var _deepArray = require("../config/helpers/deep-array"); function* run(config, code, ast) { const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); const opts = file.opts; - try { yield* transformFile(file, config.passes); } catch (e) { var _opts$filename; - - e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown"}: ${e.message}`; - + e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown file"}: ${e.message}`; if (!e.code) { e.code = "BABEL_TRANSFORM_ERROR"; } - throw e; } - let outputCode, outputMap; - try { if (opts.code !== false) { ({ @@ -56,63 +40,50 @@ function* run(config, code, ast) { } } catch (e) { var _opts$filename2; - - e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown"}: ${e.message}`; - + e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown file"}: ${e.message}`; if (!e.code) { e.code = "BABEL_GENERATE_ERROR"; } - throw e; } - return { metadata: file.metadata, options: opts, ast: opts.ast === true ? file.ast : null, code: outputCode === undefined ? null : outputCode, map: outputMap === undefined ? null : outputMap, - sourceType: file.ast.program.sourceType + sourceType: file.ast.program.sourceType, + externalDependencies: (0, _deepArray.flattenToSet)(config.externalDependencies) }; } - function* transformFile(file, pluginPasses) { for (const pluginPairs of pluginPasses) { const passPairs = []; const passes = []; const visitors = []; - 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 (const [plugin, pass] of passPairs) { const fn = plugin.pre; - if (fn) { const result = fn.call(pass, file); yield* []; - 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.`); } } } - const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); - (0, _traverse().default)(file.ast, visitor, file.scope); - for (const [plugin, pass] of passPairs) { const fn = plugin.post; - if (fn) { const result = fn.call(pass, file); yield* []; - 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.`); } @@ -120,7 +91,9 @@ function* transformFile(file, pluginPasses) { } } } - function isThenable(val) { return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/transformation/index.js.map b/node_modules/@babel/core/lib/transformation/index.js.map new file mode 100644 index 00000000..455b80f1 --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","fn","pre","result","call","isThenable","Error","traverse","merge","wrapPluginVisitorMethod","scope","post","val","then"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\ntype SourceMap = any;\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config\";\n\nimport PluginPass from \"./plugin-pass\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin\";\nimport normalizeOptions from \"./normalize-opts\";\nimport normalizeFile from \"./normalize-file\";\n\nimport generateCode from \"./file/generate\";\nimport type File from \"./file/file\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: { [key: string]: any };\n options: { [key: string]: any };\n ast: t.File | null;\n code: string | null;\n map: SourceMap | null;\n sourceType: \"script\" | \"module\";\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.pre;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .pre\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .pre, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n traverse(file.ast, visitor, file.scope);\n\n for (const [plugin, pass] of passPairs) {\n const fn = plugin.post;\n if (fn) {\n // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n const result = fn.call(pass, file);\n\n // @ts-expect-error - If we want to support async .post\n yield* [];\n\n if (isThenable(result)) {\n throw new Error(\n `You appear to be using an plugin with an async .post, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n }\n }\n }\n}\n\nfunction isThenable>(val: any): val is T {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOA,IAAAE,WAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AAiBO,UAAUO,GAAGA,CAClBC,MAAsB,EACtBC,IAAY,EACZC,GAA+B,EACV;EACrB,MAAMC,IAAI,GAAG,OAAO,IAAAC,sBAAa,EAC/BJ,MAAM,CAACK,MAAM,EACb,IAAAC,sBAAgB,EAACN,MAAM,CAAC,EACxBC,IAAI,EACJC,GACF,CAAC;EAED,MAAMK,IAAI,GAAGJ,IAAI,CAACI,IAAI;EACtB,IAAI;IACF,OAAOC,aAAa,CAACL,IAAI,EAAEH,MAAM,CAACK,MAAM,CAAC;EAC3C,CAAC,CAAC,OAAOI,CAAC,EAAE;IAAA,IAAAC,cAAA;IACVD,CAAC,CAACE,OAAO,GAAI,IAAAD,cAAA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AI;MACtB,IAAIV,EAAE,EAAE;QAEN,MAAME,MAAM,GAAGF,EAAE,CAACG,IAAI,CAACR,IAAI,EAAE7B,IAAI,CAAC;QAGlC,OAAO,EAAE;QAET,IAAIsC,UAAU,CAACF,MAAM,CAAC,EAAE;UACtB,MAAM,IAAIG,KAAK,CACZ,wDAAuD,GACrD,wDAAuD,GACvD,8DAA6D,GAC7D,2BACL,CAAC;QACH;MACF;IACF;EACF;AACF;AAEA,SAASD,UAAUA,CAA6BO,GAAQ,EAAY;EAClE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACC,IAAI,IACV,OAAOD,GAAG,CAACC,IAAI,KAAK,UAAU;AAElC;AAAC"} \ 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 c5a8a291..a07586f3 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js @@ -4,89 +4,87 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = normalizeFile; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { +function _fs() { + const data = require("fs"); + _fs = function () { return data; }; - return data; } - -var _file = _interopRequireDefault(require("./file/file")); - -var _parser = _interopRequireDefault(require("../parser")); - -var _cloneDeep = _interopRequireDefault(require("./util/clone-deep")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const fs = require("fs"); - -const path = require("path"); - -const buildDebug = require("debug"); - -const convertSourceMap = require("convert-source-map"); - -const debug = buildDebug("babel:transform:file"); -const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000; - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +function _debug() { + const data = require("debug"); + _debug = function () { + return data; + }; + return data; +} +function _t() { + const data = require("@babel/types"); + _t = function () { + return data; + }; + return data; +} +function _convertSourceMap() { + const data = require("convert-source-map"); + _convertSourceMap = function () { + return data; + }; + return data; +} +var _file = require("./file/file"); +var _parser = require("../parser"); +var _cloneDeep = require("./util/clone-deep"); +const { + file, + traverseFast +} = _t(); +const debug = _debug()("babel:transform:file"); +const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/; +const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/; function* normalizeFile(pluginPasses, options, code, ast) { code = `${code || ""}`; - if (ast) { if (ast.type === "Program") { - ast = t().file(ast, [], []); + ast = file(ast, [], []); } else if (ast.type !== "File") { throw new Error("AST root must be a Program or File node"); } - if (options.cloneInputAst) { ast = (0, _cloneDeep.default)(ast); } } else { ast = yield* (0, _parser.default)(pluginPasses, options, code); } - let inputMap = null; - if (options.inputSourceMap !== false) { if (typeof options.inputSourceMap === "object") { - inputMap = convertSourceMap.fromObject(options.inputSourceMap); + inputMap = _convertSourceMap().fromObject(options.inputSourceMap); } - if (!inputMap) { const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast); - if (lastComment) { try { - inputMap = convertSourceMap.fromComment(lastComment); + inputMap = _convertSourceMap().fromComment(lastComment); } catch (err) { debug("discarding unknown inline input sourcemap", err); } } } - if (!inputMap) { const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast); - if (typeof options.filename === "string" && lastComment) { try { const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment); - const inputMapContent = fs.readFileSync(path.resolve(path.dirname(options.filename), match[1])); - - if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) { - debug("skip merging input map > 1 MB"); - } else { - inputMap = convertSourceMap.fromJSON(inputMapContent); - } + const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]), "utf8"); + inputMap = _convertSourceMap().fromJSON(inputMapContent); } catch (err) { debug("discarding unknown file input sourcemap", err); } @@ -95,17 +93,12 @@ function* normalizeFile(pluginPasses, options, code, ast) { } } } - return new _file.default(options, { code, - ast, + ast: ast, inputMap }); } - -const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/; -const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/; - function extractCommentsFromList(regex, comments, lastComment) { if (comments) { comments = comments.filter(({ @@ -115,20 +108,20 @@ function extractCommentsFromList(regex, comments, lastComment) { lastComment = value; return false; } - return true; }); } - return [comments, lastComment]; } - function extractComments(regex, ast) { let lastComment = null; - t().traverseFast(ast, node => { + traverseFast(ast, node => { [node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment); [node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment); [node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment); }); return lastComment; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=normalize-file.js.map diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js.map b/node_modules/@babel/core/lib/transformation/normalize-file.js.map new file mode 100644 index 00000000..8798b31b --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/normalize-file.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_fs","data","require","_path","_debug","_t","_convertSourceMap","_file","_parser","_cloneDeep","file","traverseFast","debug","buildDebug","INLINE_SOURCEMAP_REGEX","EXTERNAL_SOURCEMAP_REGEX","normalizeFile","pluginPasses","options","code","ast","type","Error","cloneInputAst","cloneDeep","parser","inputMap","inputSourceMap","convertSourceMap","fromObject","lastComment","extractComments","fromComment","err","filename","match","exec","inputMapContent","fs","readFileSync","path","resolve","dirname","fromJSON","File","extractCommentsFromList","regex","comments","filter","value","test","node","leadingComments","innerComments","trailingComments"],"sources":["../../src/transformation/normalize-file.ts"],"sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file\";\nimport parser from \"../parser\";\nimport cloneDeep from \"./util/clone-deep\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\n// eslint-disable-next-line max-len\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,(?:.*)$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: { [key: string]: any },\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n // @ts-expect-error todo: use babel-types ast typings in Babel parser\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(lastComment);\n } catch (err) {\n debug(\"discarding unknown inline input sourcemap\", err);\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast as t.File,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,GAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,EAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAA0C;EAPjCQ,IAAI;EAAEC;AAAY,IAAAN,EAAA;AAS3B,MAAMO,KAAK,GAAGC,OAASA,CAAC,CAAC,sBAAsB,CAAC;AAMhD,MAAMC,sBAAsB,GAC1B,8FAA8F;AAChG,MAAMC,wBAAwB,GAC5B,gDAAgD;AAQnC,UAAUC,aAAaA,CACpCC,YAA0B,EAC1BC,OAA+B,EAC/BC,IAAY,EACZC,GAA+B,EAChB;EACfD,IAAI,GAAI,GAAEA,IAAI,IAAI,EAA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E,aAAa,EAAEvB,WAAW,CAAC,GAAGe,uBAAuB,CACzDC,KAAK,EACLK,IAAI,CAACE,aAAa,EAClBvB,WACF,CAAC;IACD,CAACqB,IAAI,CAACG,gBAAgB,EAAExB,WAAW,CAAC,GAAGe,uBAAuB,CAC5DC,KAAK,EACLK,IAAI,CAACG,gBAAgB,EACrBxB,WACF,CAAC;EACH,CAAC,CAAC;EACF,OAAOA,WAAW;AACpB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js b/node_modules/@babel/core/lib/transformation/normalize-opts.js index c81365b0..20826fc2 100644 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js +++ b/node_modules/@babel/core/lib/transformation/normalize-opts.js @@ -4,26 +4,30 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = normalizeOptions; - -const path = require("path"); - +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} function normalizeOptions(config) { const { filename, cwd, - filenameRelative = typeof filename === "string" ? path.relative(cwd, filename) : "unknown", + filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown", sourceType = "module", inputSourceMap, sourceMaps = !!inputSourceMap, sourceRoot = config.options.moduleRoot, - sourceFileName = path.basename(filenameRelative), + sourceFileName = _path().basename(filenameRelative), comments = true, compact = "auto" } = config.options; const opts = config.options; const options = Object.assign({}, opts, { parserOpts: Object.assign({ - sourceType: path.extname(filenameRelative) === ".mjs" ? "module" : sourceType, + sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType, sourceFileName: filename, plugins: [] }, opts.parserOpts), @@ -41,7 +45,6 @@ function normalizeOptions(config) { sourceFileName }, opts.generatorOpts) }); - for (const plugins of config.passes) { for (const plugin of plugins) { if (plugin.manipulateOptions) { @@ -49,6 +52,8 @@ function normalizeOptions(config) { } } } - return options; -} \ No newline at end of file +} +0 && 0; + +//# sourceMappingURL=normalize-opts.js.map diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js.map b/node_modules/@babel/core/lib/transformation/normalize-opts.js.map new file mode 100644 index 00000000..53ded538 --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/normalize-opts.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","data","require","normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","Object","assign","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"path\";\nimport type { ResolvedConfig } from \"../config\";\n\nexport default function normalizeOptions(config: ResolvedConfig): {} {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n sourceMaps,\n\n sourceRoot,\n sourceFileName,\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\n plugin.manipulateOptions(options, options.parserOpts);\n }\n }\n }\n\n return options;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,M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,UAAU;MAEVC,UAAU;MACVG;IAAc,GACXI,IAAI,CAACM,aAAa;EACtB,EACF;EAED,KAAK,MAAMD,OAAO,IAAIrB,MAAM,CAAC4B,MAAM,EAAE;IACnC,KAAK,MAAMC,MAAM,IAAIR,OAAO,EAAE;MAC5B,IAAIQ,MAAM,CAACC,iBAAiB,EAAE;QAC5BD,MAAM,CAACC,iBAAiB,CAACpB,OAAO,EAAEA,OAAO,CAACS,UAAU,CAAC;MACvD;IACF;EACF;EAEA,OAAOT,OAAO;AAChB;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js index 31553304..e39c8854 100644 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - class PluginPass { constructor(file, key, options) { this._map = new Map(); @@ -19,36 +18,31 @@ class PluginPass { this.cwd = file.opts.cwd; this.filename = file.opts.filename; } - set(key, val) { this._map.set(key, val); } - get(key) { return this._map.get(key); } - availableHelper(name, versionRange) { return this.file.availableHelper(name, versionRange); } - addHelper(name) { return this.file.addHelper(name); } - - addImport() { - return this.file.addImport(); + buildCodeFrameError(node, msg, _Error) { + return this.file.buildCodeFrameError(node, msg, _Error); } - - buildCodeFrameError(node, msg, Error) { - return this.file.buildCodeFrameError(node, msg, Error); - } - } - exports.default = PluginPass; { PluginPass.prototype.getModuleName = function getModuleName() { return this.file.getModuleName(); }; -} \ No newline at end of file + PluginPass.prototype.addImport = function addImport() { + this.file.addImport(); + }; +} +0 && 0; + +//# sourceMappingURL=plugin-pass.js.map diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js.map b/node_modules/@babel/core/lib/transformation/plugin-pass.js.map new file mode 100644 index 00000000..5d19a742 --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js.map @@ -0,0 +1 @@ +{"version":3,"names":["PluginPass","constructor","file","key","options","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type File from \"./file/file\";\nimport type { NodeLocation } from \"./file/file\";\n\nexport default class PluginPass {\n _map: Map = new Map();\n key: string | undefined | null;\n file: File;\n opts: any;\n\n // The working directory that Babel's programmatic options are loaded\n // relative to.\n cwd: string;\n\n // The absolute path of the file being compiled.\n filename: string | void;\n\n constructor(file: File, key?: string | null, options?: any | null) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: NodeLocation | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n this.file.addImport();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAC;EAa9BC,WAAWA,CAACC,IAAU,EAAEC,GAAmB,EAAEC,OAAoB,EAAE;IAAA,KAZnEC,IAAI,GAA0B,IAAIC,GAAG,CAAC,CAAC;IAAA,KACvCH,GAAG;IAAA,KACHD,IAAI;IAAA,KACJK,IAAI;IAAA,KAIJC,GAAG;IAAA,KAGHC,QAAQ;IAGN,IAAI,CAACN,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACK,IAAI,GAAGH,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACI,GAAG,GAAGN,IAAI,CAACK,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGP,IAAI,CAACK,IAAI,CAACE,QAAQ;EACpC;EAEAC,GAAGA,CAACP,GAAY,EAAEQ,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACP,GAAG,EAAEQ,GAAG,CAAC;EACzB;EAEAC,GAAGA,CAACT,GAAY,EAAO;IACrB,OAAO,IAAI,CAACE,IAAI,CAACO,GAAG,CAACT,GAAG,CAAC;EAC3B;EAEAU,eAAeA,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACb,IAAI,CAACW,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAASA,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACZ,IAAI,CAACc,SAAS,CAACF,IAAI,CAAC;EAClC;EAEAG,mBAAmBA,CACjBC,IAAqC,EACrCC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAAClB,IAAI,CAACe,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAtB,UAAA;AAEkC;EAChCA,UAAU,CAASuB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAaA,CAAA,EAE9C;IACpB,OAAO,IAAI,CAACtB,IAAI,CAACsB,aAAa,CAAC,CAAC;EAClC,CAAC;EACAxB,UAAU,CAASuB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;IACN,IAAI,CAACvB,IAAI,CAACuB,SAAS,CAAC,CAAC;EACvB,CAAC;AACH;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js b/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js deleted file mode 100644 index a42de824..00000000 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -const serialized = "$$ babel internal serialized type" + Math.random(); - -function serialize(key, value) { - if (typeof value !== "bigint") return value; - return { - [serialized]: "BigInt", - value: value.toString() - }; -} - -function revive(key, value) { - if (!value || typeof value !== "object") return value; - if (value[serialized] !== "BigInt") return value; - return BigInt(value.value); -} - -function _default(value) { - return JSON.parse(JSON.stringify(value, serialize), revive); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js b/node_modules/@babel/core/lib/transformation/util/clone-deep.js index 539b1230..fc4148fc 100644 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep.js +++ b/node_modules/@babel/core/lib/transformation/util/clone-deep.js @@ -4,17 +4,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; - -var _cloneDeepBrowser = _interopRequireDefault(require("./clone-deep-browser")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v8 = require("v8"); - -function _default(value) { - if (v8.deserialize && v8.serialize) { - return v8.deserialize(v8.serialize(value)); +function deepClone(value, cache) { + if (value !== null) { + if (cache.has(value)) return cache.get(value); + let cloned; + if (Array.isArray(value)) { + cloned = new Array(value.length); + cache.set(value, cloned); + for (let i = 0; i < value.length; i++) { + cloned[i] = typeof value[i] !== "object" ? value[i] : deepClone(value[i], cache); + } + } else { + cloned = {}; + cache.set(value, cloned); + const keys = Object.keys(value); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + cloned[key] = typeof value[key] !== "object" ? value[key] : deepClone(value[key], cache); + } + } + return cloned; } + return value; +} +function _default(value) { + if (typeof value !== "object") return value; + return deepClone(value, new Map()); +} +0 && 0; - return (0, _cloneDeepBrowser.default)(value); -} \ No newline at end of file +//# sourceMappingURL=clone-deep.js.map diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map b/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map new file mode 100644 index 00000000..a36bb6da --- /dev/null +++ b/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map @@ -0,0 +1 @@ +{"version":3,"names":["deepClone","value","cache","has","get","cloned","Array","isArray","length","set","i","keys","Object","key","_default","Map"],"sources":["../../../src/transformation/util/clone-deep.ts"],"sourcesContent":["//https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(value: any, cache: Map): any {\n if (value !== null) {\n if (cache.has(value)) return cache.get(value);\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\" ? value[i] : deepClone(value[i], cache);\n }\n } else {\n cloned = {};\n cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(value[key], cache);\n }\n }\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n return deepClone(value, new Map());\n}\n"],"mappings":";;;;;;AACA,SAASA,SAASA,CAACC,KAAU,EAAEC,KAAoB,EAAO;EACxD,IAAID,KAAK,KAAK,IAAI,EAAE;IAClB,IAAIC,KAAK,CAACC,GAAG,CAACF,KAAK,CAAC,EAAE,OAAOC,KAAK,CAACE,GAAG,CAACH,KAAK,CAAC;IAC7C,IAAII,MAAW;IACf,IAAIC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAC,EAAE;MACxBI,MAAM,GAAG,IAAIC,KAAK,CAACL,KAAK,CAACO,MAAM,CAAC;MAChCN,KAAK,CAACO,GAAG,CAACR,KAAK,EAAEI,MAAM,CAAC;MACxB,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,KAAK,CAACO,MAAM,EAAEE,CAAC,EAAE,EAAE;QACrCL,MAAM,CAACK,CAAC,CAAC,GACP,OAAOT,KAAK,CAACS,CAAC,CAAC,KAAK,QAAQ,GAAGT,KAAK,CAACS,CAAC,CAAC,GAAGV,SAAS,CAACC,KAAK,CAACS,CAAC,CAAC,EAAER,KAAK,CAAC;MACxE;IACF,CAAC,MAAM;MACLG,MAAM,GAAG,CAAC,CAAC;MACXH,KAAK,CAACO,GAAG,CAACR,KAAK,EAAEI,MAAM,CAAC;MACxB,MAAMM,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACV,KAAK,CAAC;MAC/B,KAAK,IAAIS,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACH,MAAM,EAAEE,CAAC,EAAE,EAAE;QACpC,MAAMG,GAAG,GAAGF,IAAI,CAACD,CAAC,CAAC;QACnBL,MAAM,CAACQ,GAAG,CAAC,GACT,OAAOZ,KAAK,CAACY,GAAG,CAAC,KAAK,QAAQ,GAC1BZ,KAAK,CAACY,GAAG,CAAC,GACVb,SAAS,CAACC,KAAK,CAACY,GAAG,CAAC,EAAEX,KAAK,CAAC;MACpC;IACF;IACA,OAAOG,MAAM;EACf;EACA,OAAOJ,KAAK;AACd;AAEe,SAAAa,SAAab,KAAQ,EAAK;EACvC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOD,SAAS,CAACC,KAAK,EAAE,IAAIc,GAAG,CAAC,CAAC,CAAC;AACpC;AAAC"} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js new file mode 100644 index 00000000..52d20975 --- /dev/null +++ b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js @@ -0,0 +1,1012 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.moduleResolve = moduleResolve; +exports.resolve = resolve; +function _assert() { + const data = require("assert"); + _assert = function () { + return data; + }; + return data; +} +function _fs() { + const data = _interopRequireWildcard(require("fs"), true); + _fs = function () { + return data; + }; + return data; +} +function _process() { + const data = require("process"); + _process = function () { + return data; + }; + return data; +} +function _url() { + const data = require("url"); + _url = function () { + return data; + }; + return data; +} +function _path() { + const data = require("path"); + _path = function () { + return data; + }; + return data; +} +function _module() { + const data = require("module"); + _module = function () { + return data; + }; + return data; +} +function _v() { + const data = require("v8"); + _v = function () { + return data; + }; + return data; +} +function _util() { + const data = require("util"); + _util = function () { + return data; + }; + return data; +} +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const isWindows = _process().platform === 'win32'; +const own$1 = {}.hasOwnProperty; +const classRegExp = /^([A-Z][a-z\d]*)+$/; +const kTypes = new Set(['string', 'function', 'number', 'object', 'Function', 'Object', 'boolean', 'bigint', 'symbol']); +const codes = {}; +function formatList(array, type = 'and') { + return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`; +} +const messages = new Map(); +const nodeInternalPrefix = '__node_internal_'; +let userStackTraceLimit; +codes.ERR_INVALID_ARG_TYPE = createError('ERR_INVALID_ARG_TYPE', (name, expected, actual) => { + _assert()(typeof name === 'string', "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + let message = 'The '; + if (name.endsWith(' argument')) { + message += `${name} `; + } else { + const type = name.includes('.') ? 'property' : 'argument'; + message += `"${name}" ${type} `; + } + message += 'must be '; + const types = []; + const instances = []; + const other = []; + for (const value of expected) { + _assert()(typeof value === 'string', 'All expected entries have to be of type string'); + if (kTypes.has(value)) { + types.push(value.toLowerCase()); + } else if (classRegExp.exec(value) === null) { + _assert()(value !== 'object', 'The value "object" should be written as "Object"'); + other.push(value); + } else { + instances.push(value); + } + } + if (instances.length > 0) { + const pos = types.indexOf('object'); + if (pos !== -1) { + types.slice(pos, 1); + instances.push('Object'); + } + } + if (types.length > 0) { + message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList(types, 'or')}`; + if (instances.length > 0 || other.length > 0) message += ' or '; + } + if (instances.length > 0) { + message += `an instance of ${formatList(instances, 'or')}`; + if (other.length > 0) message += ' or '; + } + if (other.length > 0) { + if (other.length > 1) { + message += `one of ${formatList(other, 'or')}`; + } else { + if (other[0].toLowerCase() !== other[0]) message += 'an '; + message += `${other[0]}`; + } + } + message += `. Received ${determineSpecificType(actual)}`; + return message; +}, TypeError); +codes.ERR_INVALID_MODULE_SPECIFIER = createError('ERR_INVALID_MODULE_SPECIFIER', (request, reason, base = undefined) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ''}`; +}, TypeError); +codes.ERR_INVALID_PACKAGE_CONFIG = createError('ERR_INVALID_PACKAGE_CONFIG', (path, base, message) => { + return `Invalid package config ${path}${base ? ` while importing ${base}` : ''}${message ? `. ${message}` : ''}`; +}, Error); +codes.ERR_INVALID_PACKAGE_TARGET = createError('ERR_INVALID_PACKAGE_TARGET', (pkgPath, key, target, isImport = false, base = undefined) => { + const relError = typeof target === 'string' && !isImport && target.length > 0 && !target.startsWith('./'); + if (key === '.') { + _assert()(isImport === false); + return `Invalid "exports" main target ${JSON.stringify(target)} defined ` + `in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ''}${relError ? '; targets must start with "./"' : ''}`; + } + return `Invalid "${isImport ? 'imports' : 'exports'}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ''}${relError ? '; targets must start with "./"' : ''}`; +}, Error); +codes.ERR_MODULE_NOT_FOUND = createError('ERR_MODULE_NOT_FOUND', (path, base, type = 'package') => { + return `Cannot find ${type} '${path}' imported from ${base}`; +}, Error); +codes.ERR_NETWORK_IMPORT_DISALLOWED = createError('ERR_NETWORK_IMPORT_DISALLOWED', "import of '%s' by %s is not supported: %s", Error); +codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError('ERR_PACKAGE_IMPORT_NOT_DEFINED', (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ''} imported from ${base}`; +}, TypeError); +codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError('ERR_PACKAGE_PATH_NOT_EXPORTED', (pkgPath, subpath, base = undefined) => { + if (subpath === '.') return `No "exports" main defined in ${pkgPath}package.json${base ? ` imported from ${base}` : ''}`; + return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base ? ` imported from ${base}` : ''}`; +}, Error); +codes.ERR_UNSUPPORTED_DIR_IMPORT = createError('ERR_UNSUPPORTED_DIR_IMPORT', "Directory import '%s' is not supported " + 'resolving ES modules imported from %s', Error); +codes.ERR_UNKNOWN_FILE_EXTENSION = createError('ERR_UNKNOWN_FILE_EXTENSION', (ext, path) => { + return `Unknown file extension "${ext}" for ${path}`; +}, TypeError); +codes.ERR_INVALID_ARG_VALUE = createError('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { + let inspected = (0, _util().inspect)(value); + if (inspected.length > 128) { + inspected = `${inspected.slice(0, 128)}...`; + } + const type = name.includes('.') ? 'property' : 'argument'; + return `The ${type} '${name}' ${reason}. Received ${inspected}`; +}, TypeError); +codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError('ERR_UNSUPPORTED_ESM_URL_SCHEME', (url, supported) => { + let message = `Only URLs with a scheme in: ${formatList(supported)} are supported by the default ESM loader`; + if (isWindows && url.protocol.length === 2) { + message += '. On Windows, absolute paths must be valid file:// URLs'; + } + message += `. Received protocol '${url.protocol}'`; + return message; +}, Error); +function createError(sym, value, def) { + messages.set(sym, value); + return makeNodeErrorWithCode(def, sym); +} +function makeNodeErrorWithCode(Base, key) { + return NodeError; + function NodeError(...args) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; + const error = new Base(); + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; + const message = getMessage(key, args, error); + Object.defineProperties(error, { + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + value() { + return `${this.name} [${key}]: ${this.message}`; + }, + enumerable: false, + writable: true, + configurable: true + } + }); + captureLargerStackTrace(error); + error.code = key; + return error; + } +} +function isErrorStackTraceLimitWritable() { + try { + if (_v().startupSnapshot.isBuildingSnapshot()) { + return false; + } + } catch (_unused) {} + const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit'); + if (desc === undefined) { + return Object.isExtensible(Error); + } + return own$1.call(desc, 'writable') && desc.writable !== undefined ? desc.writable : desc.set !== undefined; +} +function hideStackFrames(fn) { + const hidden = nodeInternalPrefix + fn.name; + Object.defineProperty(fn, 'name', { + value: hidden + }); + return fn; +} +const captureLargerStackTrace = hideStackFrames(function (error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; + } + Error.captureStackTrace(error); + if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; + return error; +}); +function getMessage(key, args, self) { + const message = messages.get(key); + _assert()(message !== undefined, 'expected `message` to be found'); + if (typeof message === 'function') { + _assert()(message.length <= args.length, `Code: ${key}; The provided arguments length (${args.length}) does not ` + `match the required ones (${message.length}).`); + return Reflect.apply(message, self, args); + } + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) expectedLength++; + _assert()(expectedLength === args.length, `Code: ${key}; The provided arguments length (${args.length}) does not ` + `match the required ones (${expectedLength}).`); + if (args.length === 0) return message; + args.unshift(message); + return Reflect.apply(_util().format, null, args); +} +function determineSpecificType(value) { + if (value === null || value === undefined) { + return String(value); + } + if (typeof value === 'function' && value.name) { + return `function ${value.name}`; + } + if (typeof value === 'object') { + if (value.constructor && value.constructor.name) { + return `an instance of ${value.constructor.name}`; + } + return `${(0, _util().inspect)(value, { + depth: -1 + })}`; + } + let inspected = (0, _util().inspect)(value, { + colors: false + }); + if (inspected.length > 28) { + inspected = `${inspected.slice(0, 25)}...`; + } + return `type ${typeof value} (${inspected})`; +} +const reader = { + read +}; +var packageJsonReader = reader; +function read(jsonPath) { + try { + const string = _fs().default.readFileSync(_path().toNamespacedPath(_path().join(_path().dirname(jsonPath), 'package.json')), 'utf8'); + return { + string + }; + } catch (error) { + const exception = error; + if (exception.code === 'ENOENT') { + return { + string: undefined + }; + } + throw exception; + } +} +const { + ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 +} = codes; +const packageJsonCache = new Map(); +function getPackageConfig(path, specifier, base) { + const existing = packageJsonCache.get(path); + if (existing !== undefined) { + return existing; + } + const source = packageJsonReader.read(path).string; + if (source === undefined) { + const packageConfig = { + pjsonPath: path, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined + }; + packageJsonCache.set(path, packageConfig); + return packageConfig; + } + let packageJson; + try { + packageJson = JSON.parse(source); + } catch (error) { + const exception = error; + throw new ERR_INVALID_PACKAGE_CONFIG$1(path, (base ? `"${specifier}" from ` : '') + (0, _url().fileURLToPath)(base || specifier), exception.message); + } + const { + exports, + imports, + main, + name, + type + } = packageJson; + const packageConfig = { + pjsonPath: path, + exists: true, + main: typeof main === 'string' ? main : undefined, + name: typeof name === 'string' ? name : undefined, + type: type === 'module' || type === 'commonjs' ? type : 'none', + exports, + imports: imports && typeof imports === 'object' ? imports : undefined + }; + packageJsonCache.set(path, packageConfig); + return packageConfig; +} +function getPackageScopeConfig(resolved) { + let packageJsonUrl = new (_url().URL)('package.json', resolved); + while (true) { + const packageJsonPath = packageJsonUrl.pathname; + if (packageJsonPath.endsWith('node_modules/package.json')) break; + const packageConfig = getPackageConfig((0, _url().fileURLToPath)(packageJsonUrl), resolved); + if (packageConfig.exists) return packageConfig; + const lastPackageJsonUrl = packageJsonUrl; + packageJsonUrl = new (_url().URL)('../package.json', packageJsonUrl); + if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break; + } + const packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); + const packageConfig = { + pjsonPath: packageJsonPath, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined + }; + packageJsonCache.set(packageJsonPath, packageConfig); + return packageConfig; +} +function getPackageType(url) { + const packageConfig = getPackageScopeConfig(url); + return packageConfig.type; +} +const { + ERR_UNKNOWN_FILE_EXTENSION +} = codes; +const hasOwnProperty = {}.hasOwnProperty; +const extensionFormatMap = { + __proto__: null, + '.cjs': 'commonjs', + '.js': 'module', + '.json': 'json', + '.mjs': 'module' +}; +function mimeToFormat(mime) { + if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return 'module'; + if (mime === 'application/json') return 'json'; + return null; +} +const protocolHandlers = { + __proto__: null, + 'data:': getDataProtocolModuleFormat, + 'file:': getFileProtocolModuleFormat, + 'http:': getHttpProtocolModuleFormat, + 'https:': getHttpProtocolModuleFormat, + 'node:'() { + return 'builtin'; + } +}; +function getDataProtocolModuleFormat(parsed) { + const { + 1: mime + } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null, null]; + return mimeToFormat(mime); +} +function extname(url) { + const pathname = url.pathname; + let index = pathname.length; + while (index--) { + const code = pathname.codePointAt(index); + if (code === 47) { + return ''; + } + if (code === 46) { + return pathname.codePointAt(index - 1) === 47 ? '' : pathname.slice(index); + } + } + return ''; +} +function getFileProtocolModuleFormat(url, _context, ignoreErrors) { + const ext = extname(url); + if (ext === '.js') { + return getPackageType(url) === 'module' ? 'module' : 'commonjs'; + } + const format = extensionFormatMap[ext]; + if (format) return format; + if (ignoreErrors) { + return undefined; + } + const filepath = (0, _url().fileURLToPath)(url); + throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); +} +function getHttpProtocolModuleFormat() {} +function defaultGetFormatWithoutErrors(url, context) { + if (!hasOwnProperty.call(protocolHandlers, url.protocol)) { + return null; + } + return protocolHandlers[url.protocol](url, context, true) || null; +} +const { + ERR_INVALID_ARG_VALUE +} = codes; +const DEFAULT_CONDITIONS = Object.freeze(['node', 'import']); +const DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); +function getDefaultConditions() { + return DEFAULT_CONDITIONS; +} +function getDefaultConditionsSet() { + return DEFAULT_CONDITIONS_SET; +} +function getConditionsSet(conditions) { + if (conditions !== undefined && conditions !== getDefaultConditions()) { + if (!Array.isArray(conditions)) { + throw new ERR_INVALID_ARG_VALUE('conditions', conditions, 'expected an array'); + } + return new Set(conditions); + } + return getDefaultConditionsSet(); +} +const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; +const experimentalNetworkImports = false; +const { + ERR_NETWORK_IMPORT_DISALLOWED, + ERR_INVALID_MODULE_SPECIFIER, + ERR_INVALID_PACKAGE_CONFIG, + ERR_INVALID_PACKAGE_TARGET, + ERR_MODULE_NOT_FOUND, + ERR_PACKAGE_IMPORT_NOT_DEFINED, + ERR_PACKAGE_PATH_NOT_EXPORTED, + ERR_UNSUPPORTED_DIR_IMPORT, + ERR_UNSUPPORTED_ESM_URL_SCHEME +} = codes; +const own = {}.hasOwnProperty; +const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; +const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +const invalidPackageNameRegEx = /^\.|%|\\/; +const patternRegEx = /\*/g; +const encodedSepRegEx = /%2f|%5c/i; +const emittedPackageWarnings = new Set(); +const doubleSlashRegEx = /[/\\]{2}/; +function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + const pjsonPath = (0, _url().fileURLToPath)(packageJsonUrl); + const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; + _process().emitWarning(`Use of deprecated ${double ? 'double slash' : 'leading or trailing slash matching'} resolving "${target}" for module ` + `request "${request}" ${request === match ? '' : `matched to "${match}" `}in the "${internal ? 'imports' : 'exports'}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}.`, 'DeprecationWarning', 'DEP0166'); +} +function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { + const format = defaultGetFormatWithoutErrors(url, { + parentURL: base.href + }); + if (format !== 'module') return; + const path = (0, _url().fileURLToPath)(url.href); + const pkgPath = (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)); + const basePath = (0, _url().fileURLToPath)(base); + if (main) _process().emitWarning(`Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, ` + `excluding the full filename and extension to the resolved file at "${path.slice(pkgPath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is` + 'deprecated for ES modules.', 'DeprecationWarning', 'DEP0151');else _process().emitWarning(`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path.slice(pkgPath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', 'DEP0151'); +} +function tryStatSync(path) { + try { + return (0, _fs().statSync)(path); + } catch (_unused2) { + return new (_fs().Stats)(); + } +} +function fileExists(url) { + const stats = (0, _fs().statSync)(url, { + throwIfNoEntry: false + }); + const isFile = stats ? stats.isFile() : undefined; + return isFile === null || isFile === undefined ? false : isFile; +} +function legacyMainResolve(packageJsonUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== undefined) { + guess = new (_url().URL)(packageConfig.main, packageJsonUrl); + if (fileExists(guess)) return guess; + const tries = [`./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node`]; + let i = -1; + while (++i < tries.length) { + guess = new (_url().URL)(tries[i], packageJsonUrl); + if (fileExists(guess)) break; + guess = undefined; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + } + const tries = ['./index.js', './index.json', './index.node']; + let i = -1; + while (++i < tries.length) { + guess = new (_url().URL)(tries[i], packageJsonUrl); + if (fileExists(guess)) break; + guess = undefined; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + throw new ERR_MODULE_NOT_FOUND((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base)); +} +function finalizeResolution(resolved, base, preserveSymlinks) { + if (encodedSepRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base)); + const filePath = (0, _url().fileURLToPath)(resolved); + const stats = tryStatSync(filePath.endsWith('/') ? filePath.slice(-1) : filePath); + if (stats.isDirectory()) { + const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, (0, _url().fileURLToPath)(base)); + error.url = String(resolved); + throw error; + } + if (!stats.isFile()) { + throw new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && (0, _url().fileURLToPath)(base), 'module'); + } + if (!preserveSymlinks) { + const real = (0, _fs().realpathSync)(filePath); + const { + search, + hash + } = resolved; + resolved = (0, _url().pathToFileURL)(real + (filePath.endsWith(_path().sep) ? '/' : '')); + resolved.search = search; + resolved.hash = hash; + } + return resolved; +} +function importNotDefined(specifier, packageJsonUrl, base) { + return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base)); +} +function exportsNotFound(subpath, packageJsonUrl, base) { + return new ERR_PACKAGE_PATH_NOT_EXPORTED((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, base && (0, _url().fileURLToPath)(base)); +} +function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { + const reason = `request is not a valid match in pattern "${match}" for the "${internal ? 'imports' : 'exports'}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && (0, _url().fileURLToPath)(base)); +} +function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { + target = typeof target === 'object' && target !== null ? JSON.stringify(target, null, '') : `${target}`; + return new ERR_INVALID_PACKAGE_TARGET((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, target, internal, base && (0, _url().fileURLToPath)(base)); +} +function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { + if (subpath !== '' && !pattern && target[target.length - 1] !== '/') throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (!target.startsWith('./')) { + if (internal && !target.startsWith('../') && !target.startsWith('/')) { + let isURL = false; + try { + new (_url().URL)(target); + isURL = true; + } catch (_unused3) {} + if (!isURL) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath; + return packageResolve(exportTarget, packageJsonUrl, conditions); + } + } + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { + if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { + if (!isPathMap) { + const request = pattern ? match.replace('*', () => subpath) : match + subpath; + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target; + emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, true); + } + } else { + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + } + const resolved = new (_url().URL)(target, packageJsonUrl); + const resolvedPath = resolved.pathname; + const packagePath = new (_url().URL)('.', packageJsonUrl).pathname; + if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (subpath === '') return resolved; + if (invalidSegmentRegEx.exec(subpath) !== null) { + const request = pattern ? match.replace('*', () => subpath) : match + subpath; + if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { + if (!isPathMap) { + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target; + emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, false); + } + } else { + throwInvalidSubpath(request, match, packageJsonUrl, internal, base); + } + } + if (pattern) { + return new (_url().URL)(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath)); + } + return new (_url().URL)(subpath, resolved); +} +function isArrayIndex(key) { + const keyNumber = Number(key); + if (`${keyNumber}` !== key) return false; + return keyNumber >= 0 && keyNumber < 0xffffffff; +} +function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { + if (typeof target === 'string') { + return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions); + } + if (Array.isArray(target)) { + const targetList = target; + if (targetList.length === 0) return null; + let lastException; + let i = -1; + while (++i < targetList.length) { + const targetItem = targetList[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); + } catch (error) { + const exception = error; + lastException = exception; + if (exception.code === 'ERR_INVALID_PACKAGE_TARGET') continue; + throw error; + } + if (resolveResult === undefined) continue; + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === undefined || lastException === null) { + return null; + } + throw lastException; + } + if (typeof target === 'object' && target !== null) { + const keys = Object.getOwnPropertyNames(target); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain numeric property keys.'); + } + } + i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (key === 'default' || conditions && conditions.has(key)) { + const conditionalTarget = target[key]; + const resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); + if (resolveResult === undefined) continue; + return resolveResult; + } + } + return null; + } + if (target === null) { + return null; + } + throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base); +} +function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { + if (typeof exports === 'string' || Array.isArray(exports)) return true; + if (typeof exports !== 'object' || exports === null) return false; + const keys = Object.getOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + let j = -1; + while (++j < keys.length) { + const key = keys[j]; + const curIsConditionalSugar = key === '' || key[0] !== '.'; + if (i++ === 0) { + isConditionalSugar = curIsConditionalSugar; + } else if (isConditionalSugar !== curIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain some keys starting with \'.\' and some not.' + ' The exports object must either be an object of package subpath keys' + ' or an object of main entry condition name keys only.'); + } + } + return isConditionalSugar; +} +function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl); + if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return; + emittedPackageWarnings.add(pjsonPath + '|' + match); + _process().emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the ` + `"exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}. Mapping specifiers ending in "/" is no longer supported.`, 'DeprecationWarning', 'DEP0155'); +} +function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { + exports = { + '.': exports + }; + } + if (own.call(exports, packageSubpath) && !packageSubpath.includes('*') && !packageSubpath.endsWith('/')) { + const target = exports[packageSubpath]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, '', packageSubpath, base, false, false, false, conditions); + if (resolveResult === null || resolveResult === undefined) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + let bestMatch = ''; + let bestMatchSubpath = ''; + const keys = Object.getOwnPropertyNames(exports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf('*'); + if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { + if (packageSubpath.endsWith('/')) { + emitTrailingSlashPatternDeprecation(packageSubpath, packageJsonUrl, base); + } + const patternTrailer = key.slice(patternIndex + 1); + if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf('*') === patternIndex) { + bestMatch = key; + bestMatchSubpath = packageSubpath.slice(patternIndex, packageSubpath.length - patternTrailer.length); + } + } + } + if (bestMatch) { + const target = exports[bestMatch]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith('/'), conditions); + if (resolveResult === null || resolveResult === undefined) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + throw exportsNotFound(packageSubpath, packageJsonUrl, base); +} +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf('*'); + const bPatternIndex = b.indexOf('*'); + const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLengthA > baseLengthB) return -1; + if (baseLengthB > baseLengthA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; + return 0; +} +function packageImportsResolve(name, base, conditions) { + if (name === '#' || name.startsWith('#/') || name.endsWith('/')) { + const reason = 'is not a valid internal imports specifier name'; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, (0, _url().fileURLToPath)(base)); + } + let packageJsonUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (own.call(imports, name) && !name.includes('*')) { + const resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], '', name, base, false, true, false, conditions); + if (resolveResult !== null && resolveResult !== undefined) { + return resolveResult; + } + } else { + let bestMatch = ''; + let bestMatchSubpath = ''; + const keys = Object.getOwnPropertyNames(imports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf('*'); + if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { + const patternTrailer = key.slice(patternIndex + 1); + if (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf('*') === patternIndex) { + bestMatch = key; + bestMatchSubpath = name.slice(patternIndex, name.length - patternTrailer.length); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions); + if (resolveResult !== null && resolveResult !== undefined) { + return resolveResult; + } + } + } + } + } + throw importNotDefined(name, packageJsonUrl, base); +} +function parsePackageName(specifier, base) { + let separatorIndex = specifier.indexOf('/'); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === '@') { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = specifier.indexOf('/', separatorIndex + 1); + } + } + const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); + if (invalidPackageNameRegEx.exec(packageName) !== null) { + validPackageName = false; + } + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER(specifier, 'is not a valid package name', (0, _url().fileURLToPath)(base)); + } + const packageSubpath = '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex)); + return { + packageName, + packageSubpath, + isScoped + }; +} +function packageResolve(specifier, base, conditions) { + if (_module().builtinModules.includes(specifier)) { + return new (_url().URL)('node:' + specifier); + } + const { + packageName, + packageSubpath, + isScoped + } = parsePackageName(specifier, base); + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + const packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath); + if (packageConfig.name === packageName && packageConfig.exports !== undefined && packageConfig.exports !== null) { + return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions); + } + } + let packageJsonUrl = new (_url().URL)('./node_modules/' + packageName + '/package.json', base); + let packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); + let lastPath; + do { + const stat = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat.isDirectory()) { + lastPath = packageJsonPath; + packageJsonUrl = new (_url().URL)((isScoped ? '../../../../node_modules/' : '../../../node_modules/') + packageName + '/package.json', packageJsonUrl); + packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); + continue; + } + const packageConfig = getPackageConfig(packageJsonPath, specifier, base); + if (packageConfig.exports !== undefined && packageConfig.exports !== null) { + return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions); + } + if (packageSubpath === '.') { + return legacyMainResolve(packageJsonUrl, packageConfig, base); + } + return new (_url().URL)(packageSubpath, packageJsonUrl); + } while (packageJsonPath.length !== lastPath.length); + throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base)); +} +function isRelativeSpecifier(specifier) { + if (specifier[0] === '.') { + if (specifier.length === 1 || specifier[1] === '/') return true; + if (specifier[1] === '.' && (specifier.length === 2 || specifier[2] === '/')) { + return true; + } + } + return false; +} +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === '') return false; + if (specifier[0] === '/') return true; + return isRelativeSpecifier(specifier); +} +function moduleResolve(specifier, base, conditions, preserveSymlinks) { + const protocol = base.protocol; + const isRemote = protocol === 'http:' || protocol === 'https:'; + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + resolved = new (_url().URL)(specifier, base); + } else if (!isRemote && specifier[0] === '#') { + resolved = packageImportsResolve(specifier, base, conditions); + } else { + try { + resolved = new (_url().URL)(specifier); + } catch (_unused4) { + if (!isRemote) { + resolved = packageResolve(specifier, base, conditions); + } + } + } + _assert()(resolved !== undefined, 'expected to be defined'); + if (resolved.protocol !== 'file:') { + return resolved; + } + return finalizeResolution(resolved, base, preserveSymlinks); +} +function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { + if (parsedParentURL) { + const parentProtocol = parsedParentURL.protocol; + if (parentProtocol === 'http:' || parentProtocol === 'https:') { + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + const parsedProtocol = parsed == null ? void 0 : parsed.protocol; + if (parsedProtocol && parsedProtocol !== 'https:' && parsedProtocol !== 'http:') { + throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'remote imports cannot import from a local location.'); + } + return { + url: (parsed == null ? void 0 : parsed.href) || '' + }; + } + if (_module().builtinModules.includes(specifier)) { + throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'remote imports cannot import from a local location.'); + } + throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'only relative and absolute specifiers are supported.'); + } + } +} +function isURL(self) { + return Boolean(self && typeof self === 'object' && 'href' in self && typeof self.href === 'string' && 'protocol' in self && typeof self.protocol === 'string' && self.href && self.protocol); +} +function throwIfInvalidParentURL(parentURL) { + if (parentURL === undefined) { + return; + } + if (typeof parentURL !== 'string' && !isURL(parentURL)) { + throw new codes.ERR_INVALID_ARG_TYPE('parentURL', ['string', 'URL'], parentURL); + } +} +function throwIfUnsupportedURLProtocol(url) { + const protocol = url.protocol; + if (protocol !== 'file:' && protocol !== 'data:' && protocol !== 'node:') { + throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url); + } +} +function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) { + const protocol = parsed == null ? void 0 : parsed.protocol; + if (protocol && protocol !== 'file:' && protocol !== 'data:' && (!experimentalNetworkImports || protocol !== 'https:' && protocol !== 'http:')) { + throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, ['file', 'data'].concat(experimentalNetworkImports ? ['https', 'http'] : [])); + } +} +function defaultResolve(specifier, context = {}) { + const { + parentURL + } = context; + _assert()(parentURL !== undefined, 'expected `parentURL` to be defined'); + throwIfInvalidParentURL(parentURL); + let parsedParentURL; + if (parentURL) { + try { + parsedParentURL = new (_url().URL)(parentURL); + } catch (_unused5) {} + } + let parsed; + try { + parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new (_url().URL)(specifier, parsedParentURL) : new (_url().URL)(specifier); + const protocol = parsed.protocol; + if (protocol === 'data:' || experimentalNetworkImports && (protocol === 'https:' || protocol === 'http:')) { + return { + url: parsed.href, + format: null + }; + } + } catch (_unused6) {} + const maybeReturn = checkIfDisallowedImport(specifier, parsed, parsedParentURL); + if (maybeReturn) return maybeReturn; + if (parsed && parsed.protocol === 'node:') return { + url: specifier + }; + throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports); + const conditions = getConditionsSet(context.conditions); + const url = moduleResolve(specifier, new (_url().URL)(parentURL), conditions, false); + throwIfUnsupportedURLProtocol(url); + return { + url: url.href, + format: defaultGetFormatWithoutErrors(url, { + parentURL + }) + }; +} +function resolve(specifier, parent) { + if (!parent) { + throw new Error('Please pass `parent`: `import-meta-resolve` cannot ponyfill that'); + } + try { + return defaultResolve(specifier, { + parentURL: parent + }).url; + } catch (error) { + const exception = error; + if (exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' && typeof exception.url === 'string') { + return exception.url; + } + throw error; + } +} +0 && 0; + +//# sourceMappingURL=import-meta-resolve.js.map diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map new file mode 100644 index 00000000..27f0d290 --- /dev/null +++ b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_assert","data","require","_fs","_interopRequireWildcard","_process","_url","_path","_module","_v","_util","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","isWindows","process","platform","own$1","classRegExp","kTypes","Set","codes","formatList","array","type","length","join","slice","messages","Map","nodeInternalPrefix","userStackTraceLimit","ERR_INVALID_ARG_TYPE","createError","name","expected","actual","assert","Array","isArray","message","endsWith","includes","types","instances","other","value","push","toLowerCase","exec","pos","indexOf","determineSpecificType","TypeError","ERR_INVALID_MODULE_SPECIFIER","request","reason","base","undefined","ERR_INVALID_PACKAGE_CONFIG","path","Error","ERR_INVALID_PACKAGE_TARGET","pkgPath","target","isImport","relError","startsWith","JSON","stringify","ERR_MODULE_NOT_FOUND","ERR_NETWORK_IMPORT_DISALLOWED","ERR_PACKAGE_IMPORT_NOT_DEFINED","specifier","packagePath","ERR_PACKAGE_PATH_NOT_EXPORTED","subpath","ERR_UNSUPPORTED_DIR_IMPORT","ERR_UNKNOWN_FILE_EXTENSION","ext","ERR_INVALID_ARG_VALUE","inspected","inspect","ERR_UNSUPPORTED_ESM_URL_SCHEME","url","supported","protocol","sym","def","makeNodeErrorWithCode","Base","NodeError","args","limit","stackTraceLimit","isErrorStackTraceLimitWritable","error","getMessage","defineProperties","enumerable","writable","configurable","toString","captureLargerStackTrace","code","v8","startupSnapshot","isBuildingSnapshot","_unused","isExtensible","hideStackFrames","fn","hidden","stackTraceLimitIsWritable","Number","POSITIVE_INFINITY","captureStackTrace","self","Reflect","apply","regex","expectedLength","unshift","format","String","constructor","depth","colors","reader","read","packageJsonReader","jsonPath","string","fs","readFileSync","toNamespacedPath","dirname","exception","ERR_INVALID_PACKAGE_CONFIG$1","packageJsonCache","getPackageConfig","existing","source","packageConfig","pjsonPath","exists","main","exports","imports","packageJson","parse","fileURLToPath","getPackageScopeConfig","resolved","packageJsonUrl","URL","packageJsonPath","pathname","lastPackageJsonUrl","getPackageType","extensionFormatMap","__proto__","mimeToFormat","mime","test","protocolHandlers","getDataProtocolModuleFormat","getFileProtocolModuleFormat","getHttpProtocolModuleFormat","node:","parsed","extname","index","codePointAt","_context","ignoreErrors","filepath","defaultGetFormatWithoutErrors","context","DEFAULT_CONDITIONS","freeze","DEFAULT_CONDITIONS_SET","getDefaultConditions","getDefaultConditionsSet","getConditionsSet","conditions","RegExpPrototypeSymbolReplace","RegExp","Symbol","replace","experimentalNetworkImports","own","invalidSegmentRegEx","deprecatedInvalidSegmentRegEx","invalidPackageNameRegEx","patternRegEx","encodedSepRegEx","emittedPackageWarnings","doubleSlashRegEx","emitInvalidSegmentDeprecation","match","internal","isTarget","double","emitWarning","emitLegacyIndexDeprecation","parentURL","href","basePath","tryStatSync","statSync","_unused2","Stats","fileExists","stats","throwIfNoEntry","isFile","legacyMainResolve","guess","tries","i","finalizeResolution","preserveSymlinks","filePath","isDirectory","real","realpathSync","search","hash","pathToFileURL","sep","importNotDefined","exportsNotFound","throwInvalidSubpath","invalidPackageTarget","resolvePackageTargetString","pattern","isPathMap","isURL","_unused3","exportTarget","packageResolve","resolvedTarget","resolvedPath","isArrayIndex","keyNumber","resolvePackageTarget","packageSubpath","targetList","lastException","targetItem","resolveResult","keys","getOwnPropertyNames","conditionalTarget","isConditionalExportsMainSugar","isConditionalSugar","j","curIsConditionalSugar","emitTrailingSlashPatternDeprecation","pjsonUrl","add","packageExportsResolve","bestMatch","bestMatchSubpath","patternIndex","patternTrailer","patternKeyCompare","lastIndexOf","a","b","aPatternIndex","bPatternIndex","baseLengthA","baseLengthB","packageImportsResolve","parsePackageName","separatorIndex","validPackageName","isScoped","packageName","builtinModules","lastPath","stat","isRelativeSpecifier","shouldBeTreatedAsRelativeOrAbsolutePath","moduleResolve","isRemote","_unused4","checkIfDisallowedImport","parsedParentURL","parentProtocol","parsedProtocol","Boolean","throwIfInvalidParentURL","throwIfUnsupportedURLProtocol","throwIfUnsupportedURLScheme","concat","defaultResolve","_unused5","_unused6","maybeReturn","resolve","parent"],"sources":["../../src/vendor/import-meta-resolve.js"],"sourcesContent":["\n/****************************************************************************\\\n * NOTE FROM BABEL AUTHORS *\n * This file is inlined from https://github.com/wooorm/import-meta-resolve, *\n * because we need to compile it to CommonJS. *\n\\****************************************************************************/\n\n/*\n(The MIT License)\n\nCopyright (c) 2021 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\nThis is a derivative work based on:\n.\nWhich is licensed:\n\n\"\"\"\nCopyright Node.js contributors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n\nThis license applies to parts of Node.js originating from the\nhttps://github.com/joyent/node repository:\n\n\"\"\"\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n*/\n\nimport assert from 'assert';\nimport fs, { realpathSync, statSync, Stats } from 'fs';\nimport process from 'process';\nimport { fileURLToPath, URL, pathToFileURL } from 'url';\nimport path from 'path';\nimport { builtinModules } from 'module';\nimport v8 from 'v8';\nimport { format, inspect } from 'util';\n\n/**\n * @typedef ErrnoExceptionFields\n * @property {number | undefined} [errnode]\n * @property {string | undefined} [code]\n * @property {string | undefined} [path]\n * @property {string | undefined} [syscall]\n * @property {string | undefined} [url]\n *\n * @typedef {Error & ErrnoExceptionFields} ErrnoException\n */\n\nconst isWindows = process.platform === 'win32';\n\nconst own$1 = {}.hasOwnProperty;\n\nconst classRegExp = /^([A-Z][a-z\\d]*)+$/;\n// Sorted by a rough estimate on most frequently used entries.\nconst kTypes = new Set([\n 'string',\n 'function',\n 'number',\n 'object',\n // Accept 'Function' and 'Object' as alternative to the lower cased version.\n 'Function',\n 'Object',\n 'boolean',\n 'bigint',\n 'symbol'\n]);\n\nconst codes = {};\n\n/**\n * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.\n * We cannot use Intl.ListFormat because it's not available in\n * --without-intl builds.\n *\n * @param {Array} array\n * An array of strings.\n * @param {string} [type]\n * The list type to be inserted before the last element.\n * @returns {string}\n */\nfunction formatList(array, type = 'and') {\n return array.length < 3\n ? array.join(` ${type} `)\n : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`\n}\n\n/** @type {Map} */\nconst messages = new Map();\nconst nodeInternalPrefix = '__node_internal_';\n/** @type {number} */\nlet userStackTraceLimit;\n\ncodes.ERR_INVALID_ARG_TYPE = createError(\n 'ERR_INVALID_ARG_TYPE',\n /**\n * @param {string} name\n * @param {Array | string} expected\n * @param {unknown} actual\n */\n (name, expected, actual) => {\n assert(typeof name === 'string', \"'name' must be a string\");\n if (!Array.isArray(expected)) {\n expected = [expected];\n }\n\n let message = 'The ';\n if (name.endsWith(' argument')) {\n // For cases like 'first argument'\n message += `${name} `;\n } else {\n const type = name.includes('.') ? 'property' : 'argument';\n message += `\"${name}\" ${type} `;\n }\n\n message += 'must be ';\n\n /** @type {Array} */\n const types = [];\n /** @type {Array} */\n const instances = [];\n /** @type {Array} */\n const other = [];\n\n for (const value of expected) {\n assert(\n typeof value === 'string',\n 'All expected entries have to be of type string'\n );\n\n if (kTypes.has(value)) {\n types.push(value.toLowerCase());\n } else if (classRegExp.exec(value) === null) {\n assert(\n value !== 'object',\n 'The value \"object\" should be written as \"Object\"'\n );\n other.push(value);\n } else {\n instances.push(value);\n }\n }\n\n // Special handle `object` in case other instances are allowed to outline\n // the differences between each other.\n if (instances.length > 0) {\n const pos = types.indexOf('object');\n if (pos !== -1) {\n types.slice(pos, 1);\n instances.push('Object');\n }\n }\n\n if (types.length > 0) {\n message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList(\n types,\n 'or'\n )}`;\n if (instances.length > 0 || other.length > 0) message += ' or ';\n }\n\n if (instances.length > 0) {\n message += `an instance of ${formatList(instances, 'or')}`;\n if (other.length > 0) message += ' or ';\n }\n\n if (other.length > 0) {\n if (other.length > 1) {\n message += `one of ${formatList(other, 'or')}`;\n } else {\n if (other[0].toLowerCase() !== other[0]) message += 'an ';\n message += `${other[0]}`;\n }\n }\n\n message += `. Received ${determineSpecificType(actual)}`;\n\n return message\n },\n TypeError\n);\n\ncodes.ERR_INVALID_MODULE_SPECIFIER = createError(\n 'ERR_INVALID_MODULE_SPECIFIER',\n /**\n * @param {string} request\n * @param {string} reason\n * @param {string} [base]\n */\n (request, reason, base = undefined) => {\n return `Invalid module \"${request}\" ${reason}${\n base ? ` imported from ${base}` : ''\n }`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_PACKAGE_CONFIG = createError(\n 'ERR_INVALID_PACKAGE_CONFIG',\n /**\n * @param {string} path\n * @param {string} [base]\n * @param {string} [message]\n */\n (path, base, message) => {\n return `Invalid package config ${path}${\n base ? ` while importing ${base}` : ''\n }${message ? `. ${message}` : ''}`\n },\n Error\n);\n\ncodes.ERR_INVALID_PACKAGE_TARGET = createError(\n 'ERR_INVALID_PACKAGE_TARGET',\n /**\n * @param {string} pkgPath\n * @param {string} key\n * @param {unknown} target\n * @param {boolean} [isImport=false]\n * @param {string} [base]\n */\n (pkgPath, key, target, isImport = false, base = undefined) => {\n const relError =\n typeof target === 'string' &&\n !isImport &&\n target.length > 0 &&\n !target.startsWith('./');\n if (key === '.') {\n assert(isImport === false);\n return (\n `Invalid \"exports\" main target ${JSON.stringify(target)} defined ` +\n `in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n )\n }\n\n return `Invalid \"${\n isImport ? 'imports' : 'exports'\n }\" target ${JSON.stringify(\n target\n )} defined for '${key}' in the package config ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }${relError ? '; targets must start with \"./\"' : ''}`\n },\n Error\n);\n\ncodes.ERR_MODULE_NOT_FOUND = createError(\n 'ERR_MODULE_NOT_FOUND',\n /**\n * @param {string} path\n * @param {string} base\n * @param {string} [type]\n */\n (path, base, type = 'package') => {\n return `Cannot find ${type} '${path}' imported from ${base}`\n },\n Error\n);\n\ncodes.ERR_NETWORK_IMPORT_DISALLOWED = createError(\n 'ERR_NETWORK_IMPORT_DISALLOWED',\n \"import of '%s' by %s is not supported: %s\",\n Error\n);\n\ncodes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\n 'ERR_PACKAGE_IMPORT_NOT_DEFINED',\n /**\n * @param {string} specifier\n * @param {string} packagePath\n * @param {string} base\n */\n (specifier, packagePath, base) => {\n return `Package import specifier \"${specifier}\" is not defined${\n packagePath ? ` in package ${packagePath}package.json` : ''\n } imported from ${base}`\n },\n TypeError\n);\n\ncodes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\n 'ERR_PACKAGE_PATH_NOT_EXPORTED',\n /**\n * @param {string} pkgPath\n * @param {string} subpath\n * @param {string} [base]\n */\n (pkgPath, subpath, base = undefined) => {\n if (subpath === '.')\n return `No \"exports\" main defined in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n return `Package subpath '${subpath}' is not defined by \"exports\" in ${pkgPath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n },\n Error\n);\n\ncodes.ERR_UNSUPPORTED_DIR_IMPORT = createError(\n 'ERR_UNSUPPORTED_DIR_IMPORT',\n \"Directory import '%s' is not supported \" +\n 'resolving ES modules imported from %s',\n Error\n);\n\ncodes.ERR_UNKNOWN_FILE_EXTENSION = createError(\n 'ERR_UNKNOWN_FILE_EXTENSION',\n /**\n * @param {string} ext\n * @param {string} path\n */\n (ext, path) => {\n return `Unknown file extension \"${ext}\" for ${path}`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_ARG_VALUE = createError(\n 'ERR_INVALID_ARG_VALUE',\n /**\n * @param {string} name\n * @param {unknown} value\n * @param {string} [reason='is invalid']\n */\n (name, value, reason = 'is invalid') => {\n let inspected = inspect(value);\n\n if (inspected.length > 128) {\n inspected = `${inspected.slice(0, 128)}...`;\n }\n\n const type = name.includes('.') ? 'property' : 'argument';\n\n return `The ${type} '${name}' ${reason}. Received ${inspected}`\n },\n TypeError\n // Note: extra classes have been shaken out.\n // , RangeError\n);\n\ncodes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(\n 'ERR_UNSUPPORTED_ESM_URL_SCHEME',\n /**\n * @param {URL} url\n * @param {Array} supported\n */\n (url, supported) => {\n let message = `Only URLs with a scheme in: ${formatList(\n supported\n )} are supported by the default ESM loader`;\n\n if (isWindows && url.protocol.length === 2) {\n message += '. On Windows, absolute paths must be valid file:// URLs';\n }\n\n message += `. Received protocol '${url.protocol}'`;\n return message\n },\n Error\n);\n\n/**\n * Utility function for registering the error codes. Only used here. Exported\n * *only* to allow for testing.\n * @param {string} sym\n * @param {MessageFunction | string} value\n * @param {ErrorConstructor} def\n * @returns {new (...args: Array) => Error}\n */\nfunction createError(sym, value, def) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, value);\n\n return makeNodeErrorWithCode(def, sym)\n}\n\n/**\n * @param {ErrorConstructor} Base\n * @param {string} key\n * @returns {ErrorConstructor}\n */\nfunction makeNodeErrorWithCode(Base, key) {\n // @ts-expect-error It’s a Node error.\n return NodeError\n /**\n * @param {Array} args\n */\n function NodeError(...args) {\n const limit = Error.stackTraceLimit;\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;\n const error = new Base();\n // Reset the limit and setting the name property.\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;\n const message = getMessage(key, args, error);\n Object.defineProperties(error, {\n // Note: no need to implement `kIsNodeError` symbol, would be hard,\n // probably.\n message: {\n value: message,\n enumerable: false,\n writable: true,\n configurable: true\n },\n toString: {\n /** @this {Error} */\n value() {\n return `${this.name} [${key}]: ${this.message}`\n },\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n captureLargerStackTrace(error);\n // @ts-expect-error It’s a Node error.\n error.code = key;\n return error\n }\n}\n\n/**\n * @returns {boolean}\n */\nfunction isErrorStackTraceLimitWritable() {\n // Do no touch Error.stackTraceLimit as V8 would attempt to install\n // it again during deserialization.\n try {\n // @ts-expect-error: not in types?\n if (v8.startupSnapshot.isBuildingSnapshot()) {\n return false\n }\n } catch {}\n\n const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');\n if (desc === undefined) {\n return Object.isExtensible(Error)\n }\n\n return own$1.call(desc, 'writable') && desc.writable !== undefined\n ? desc.writable\n : desc.set !== undefined\n}\n\n/**\n * This function removes unnecessary frames from Node.js core errors.\n * @template {(...args: unknown[]) => unknown} T\n * @param {T} fn\n * @returns {T}\n */\nfunction hideStackFrames(fn) {\n // We rename the functions that will be hidden to cut off the stacktrace\n // at the outermost one\n const hidden = nodeInternalPrefix + fn.name;\n Object.defineProperty(fn, 'name', {value: hidden});\n return fn\n}\n\nconst captureLargerStackTrace = hideStackFrames(\n /**\n * @param {Error} error\n * @returns {Error}\n */\n // @ts-expect-error: fine\n function (error) {\n const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();\n if (stackTraceLimitIsWritable) {\n userStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = Number.POSITIVE_INFINITY;\n }\n\n Error.captureStackTrace(error);\n\n // Reset the limit\n if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;\n\n return error\n }\n);\n\n/**\n * @param {string} key\n * @param {Array} args\n * @param {Error} self\n * @returns {string}\n */\nfunction getMessage(key, args, self) {\n const message = messages.get(key);\n assert(message !== undefined, 'expected `message` to be found');\n\n if (typeof message === 'function') {\n assert(\n message.length <= args.length, // Default options do not count.\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${message.length}).`\n );\n return Reflect.apply(message, self, args)\n }\n\n const regex = /%[dfijoOs]/g;\n let expectedLength = 0;\n while (regex.exec(message) !== null) expectedLength++;\n assert(\n expectedLength === args.length,\n `Code: ${key}; The provided arguments length (${args.length}) does not ` +\n `match the required ones (${expectedLength}).`\n );\n if (args.length === 0) return message\n\n args.unshift(message);\n return Reflect.apply(format, null, args)\n}\n\n/**\n * Determine the specific type of a value for type-mismatch errors.\n * @param {unknown} value\n * @returns {string}\n */\nfunction determineSpecificType(value) {\n if (value === null || value === undefined) {\n return String(value)\n }\n\n if (typeof value === 'function' && value.name) {\n return `function ${value.name}`\n }\n\n if (typeof value === 'object') {\n if (value.constructor && value.constructor.name) {\n return `an instance of ${value.constructor.name}`\n }\n\n return `${inspect(value, {depth: -1})}`\n }\n\n let inspected = inspect(value, {colors: false});\n\n if (inspected.length > 28) {\n inspected = `${inspected.slice(0, 25)}...`;\n }\n\n return `type ${typeof value} (${inspected})`\n}\n\n// Manually “tree shaken” from:\n\nconst reader = {read};\nvar packageJsonReader = reader;\n\n/**\n * @param {string} jsonPath\n * @returns {{string: string | undefined}}\n */\nfunction read(jsonPath) {\n try {\n const string = fs.readFileSync(\n path.toNamespacedPath(path.join(path.dirname(jsonPath), 'package.json')),\n 'utf8'\n );\n return {string}\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n\n if (exception.code === 'ENOENT') {\n return {string: undefined}\n // Throw all other errors.\n /* c8 ignore next 4 */\n }\n\n throw exception\n }\n}\n\n// Manually “tree shaken” from:\n\nconst {ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1} = codes;\n\n/** @type {Map} */\nconst packageJsonCache = new Map();\n\n/**\n * @param {string} path\n * @param {URL | string} specifier Note: `specifier` is actually optional, not base.\n * @param {URL} [base]\n * @returns {PackageConfig}\n */\nfunction getPackageConfig(path, specifier, base) {\n const existing = packageJsonCache.get(path);\n if (existing !== undefined) {\n return existing\n }\n\n const source = packageJsonReader.read(path).string;\n\n if (source === undefined) {\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n }\n\n /** @type {Record} */\n let packageJson;\n try {\n packageJson = JSON.parse(source);\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n\n throw new ERR_INVALID_PACKAGE_CONFIG$1(\n path,\n (base ? `\"${specifier}\" from ` : '') + fileURLToPath(base || specifier),\n exception.message\n )\n }\n\n const {exports, imports, main, name, type} = packageJson;\n\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: path,\n exists: true,\n main: typeof main === 'string' ? main : undefined,\n name: typeof name === 'string' ? name : undefined,\n type: type === 'module' || type === 'commonjs' ? type : 'none',\n // @ts-expect-error Assume `Record`.\n exports,\n // @ts-expect-error Assume `Record`.\n imports: imports && typeof imports === 'object' ? imports : undefined\n };\n packageJsonCache.set(path, packageConfig);\n return packageConfig\n}\n\n/**\n * @param {URL} resolved\n * @returns {PackageConfig}\n */\nfunction getPackageScopeConfig(resolved) {\n let packageJsonUrl = new URL('package.json', resolved);\n\n while (true) {\n const packageJsonPath = packageJsonUrl.pathname;\n\n if (packageJsonPath.endsWith('node_modules/package.json')) break\n\n const packageConfig = getPackageConfig(\n fileURLToPath(packageJsonUrl),\n resolved\n );\n if (packageConfig.exists) return packageConfig\n\n const lastPackageJsonUrl = packageJsonUrl;\n packageJsonUrl = new URL('../package.json', packageJsonUrl);\n\n // Terminates at root where ../package.json equals ../../package.json\n // (can't just check \"/package.json\" for Windows support).\n if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break\n }\n\n const packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {PackageConfig} */\n const packageConfig = {\n pjsonPath: packageJsonPath,\n exists: false,\n main: undefined,\n name: undefined,\n type: 'none',\n exports: undefined,\n imports: undefined\n };\n packageJsonCache.set(packageJsonPath, packageConfig);\n return packageConfig\n}\n\n// Manually “tree shaken” from:\n\n/**\n * @param {URL} url\n * @returns {PackageType}\n */\nfunction getPackageType(url) {\n const packageConfig = getPackageScopeConfig(url);\n return packageConfig.type\n}\n\n// Manually “tree shaken” from:\n\nconst {ERR_UNKNOWN_FILE_EXTENSION} = codes;\n\nconst hasOwnProperty = {}.hasOwnProperty;\n\n/** @type {Record} */\nconst extensionFormatMap = {\n // @ts-expect-error: hush.\n __proto__: null,\n '.cjs': 'commonjs',\n '.js': 'module',\n '.json': 'json',\n '.mjs': 'module'\n};\n\n/**\n * @param {string | null} mime\n * @returns {string | null}\n */\nfunction mimeToFormat(mime) {\n if (\n mime &&\n /\\s*(text|application)\\/javascript\\s*(;\\s*charset=utf-?8\\s*)?/i.test(mime)\n )\n return 'module'\n if (mime === 'application/json') return 'json'\n return null\n}\n\n/**\n * @callback ProtocolHandler\n * @param {URL} parsed\n * @param {{parentURL: string}} context\n * @param {boolean} ignoreErrors\n * @returns {string | null | void}\n */\n\n/**\n * @type {Record}\n */\nconst protocolHandlers = {\n // @ts-expect-error: hush.\n __proto__: null,\n 'data:': getDataProtocolModuleFormat,\n 'file:': getFileProtocolModuleFormat,\n 'http:': getHttpProtocolModuleFormat,\n 'https:': getHttpProtocolModuleFormat,\n 'node:'() {\n return 'builtin'\n }\n};\n\n/**\n * @param {URL} parsed\n */\nfunction getDataProtocolModuleFormat(parsed) {\n const {1: mime} = /^([^/]+\\/[^;,]+)[^,]*?(;base64)?,/.exec(\n parsed.pathname\n ) || [null, null, null];\n return mimeToFormat(mime)\n}\n\n/**\n * Returns the file extension from a URL.\n *\n * Should give similar result to\n * `require('node:path').extname(require('node:url').fileURLToPath(url))`\n * when used with a `file:` URL.\n *\n * @param {URL} url\n * @returns {string}\n */\nfunction extname(url) {\n const pathname = url.pathname;\n let index = pathname.length;\n\n while (index--) {\n const code = pathname.codePointAt(index);\n\n if (code === 47 /* `/` */) {\n return ''\n }\n\n if (code === 46 /* `.` */) {\n return pathname.codePointAt(index - 1) === 47 /* `/` */\n ? ''\n : pathname.slice(index)\n }\n }\n\n return ''\n}\n\n/**\n * @type {ProtocolHandler}\n */\nfunction getFileProtocolModuleFormat(url, _context, ignoreErrors) {\n const ext = extname(url);\n\n if (ext === '.js') {\n return getPackageType(url) === 'module' ? 'module' : 'commonjs'\n }\n\n const format = extensionFormatMap[ext];\n if (format) return format\n\n // Explicit undefined return indicates load hook should rerun format check\n if (ignoreErrors) {\n return undefined\n }\n\n const filepath = fileURLToPath(url);\n throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath)\n}\n\nfunction getHttpProtocolModuleFormat() {\n // To do: HTTPS imports.\n}\n\n/**\n * @param {URL} url\n * @param {{parentURL: string}} context\n * @returns {string | null}\n */\nfunction defaultGetFormatWithoutErrors(url, context) {\n if (!hasOwnProperty.call(protocolHandlers, url.protocol)) {\n return null\n }\n\n return protocolHandlers[url.protocol](url, context, true) || null\n}\n\n// Manually “tree shaken” from:\n\nconst {ERR_INVALID_ARG_VALUE} = codes;\n\n// In Node itself these values are populated from CLI arguments, before any\n// user code runs.\n// Here we just define the defaults.\nconst DEFAULT_CONDITIONS = Object.freeze(['node', 'import']);\nconst DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);\n\nfunction getDefaultConditions() {\n return DEFAULT_CONDITIONS\n}\n\nfunction getDefaultConditionsSet() {\n return DEFAULT_CONDITIONS_SET\n}\n\n/**\n * @param {Array} [conditions]\n * @returns {Set}\n */\nfunction getConditionsSet(conditions) {\n if (conditions !== undefined && conditions !== getDefaultConditions()) {\n if (!Array.isArray(conditions)) {\n throw new ERR_INVALID_ARG_VALUE(\n 'conditions',\n conditions,\n 'expected an array'\n )\n }\n\n return new Set(conditions)\n }\n\n return getDefaultConditionsSet()\n}\n\n// Manually “tree shaken” from:\n\nconst RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];\n\n// To do: potentially enable?\nconst experimentalNetworkImports = false;\n\nconst {\n ERR_NETWORK_IMPORT_DISALLOWED,\n ERR_INVALID_MODULE_SPECIFIER,\n ERR_INVALID_PACKAGE_CONFIG,\n ERR_INVALID_PACKAGE_TARGET,\n ERR_MODULE_NOT_FOUND,\n ERR_PACKAGE_IMPORT_NOT_DEFINED,\n ERR_PACKAGE_PATH_NOT_EXPORTED,\n ERR_UNSUPPORTED_DIR_IMPORT,\n ERR_UNSUPPORTED_ESM_URL_SCHEME\n} = codes;\n\nconst own = {}.hasOwnProperty;\n\nconst invalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\\\|\\/|$)/i;\nconst deprecatedInvalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i;\nconst invalidPackageNameRegEx = /^\\.|%|\\\\/;\nconst patternRegEx = /\\*/g;\nconst encodedSepRegEx = /%2f|%5c/i;\n/** @type {Set} */\nconst emittedPackageWarnings = new Set();\n\nconst doubleSlashRegEx = /[/\\\\]{2}/;\n\n/**\n *\n * @param {string} target\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} base\n * @param {boolean} isTarget\n */\nfunction emitInvalidSegmentDeprecation(\n target,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n isTarget\n) {\n const pjsonPath = fileURLToPath(packageJsonUrl);\n const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;\n process.emitWarning(\n `Use of deprecated ${\n double ? 'double slash' : 'leading or trailing slash matching'\n } resolving \"${target}\" for module ` +\n `request \"${request}\" ${\n request === match ? '' : `matched to \"${match}\" `\n }in the \"${\n internal ? 'imports' : 'exports'\n }\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }.`,\n 'DeprecationWarning',\n 'DEP0166'\n );\n}\n\n/**\n * @param {URL} url\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {unknown} [main]\n * @returns {void}\n */\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n const format = defaultGetFormatWithoutErrors(url, {parentURL: base.href});\n if (format !== 'module') return\n const path = fileURLToPath(url.href);\n const pkgPath = fileURLToPath(new URL('.', packageJsonUrl));\n const basePath = fileURLToPath(base);\n if (main)\n process.emitWarning(\n `Package ${pkgPath} has a \"main\" field set to ${JSON.stringify(main)}, ` +\n `excluding the full filename and extension to the resolved file at \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is` +\n 'deprecated for ES modules.',\n 'DeprecationWarning',\n 'DEP0151'\n );\n else\n process.emitWarning(\n `No \"main\" or \"exports\" field defined in the package.json for ${pkgPath} resolving the main entry point \"${path.slice(\n pkgPath.length\n )}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`,\n 'DeprecationWarning',\n 'DEP0151'\n );\n}\n\n/**\n * @param {string} path\n * @returns {Stats}\n */\nfunction tryStatSync(path) {\n // Note: from Node 15 onwards we can use `throwIfNoEntry: false` instead.\n try {\n return statSync(path)\n } catch {\n return new Stats()\n }\n}\n\n/**\n * Legacy CommonJS main resolution:\n * 1. let M = pkg_url + (json main field)\n * 2. TRY(M, M.js, M.json, M.node)\n * 3. TRY(M/index.js, M/index.json, M/index.node)\n * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)\n * 5. NOT_FOUND\n *\n * @param {URL} url\n * @returns {boolean}\n */\nfunction fileExists(url) {\n const stats = statSync(url, {throwIfNoEntry: false});\n const isFile = stats ? stats.isFile() : undefined;\n return isFile === null || isFile === undefined ? false : isFile\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {PackageConfig} packageConfig\n * @param {URL} base\n * @returns {URL}\n */\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n /** @type {URL | undefined} */\n let guess;\n if (packageConfig.main !== undefined) {\n guess = new URL(packageConfig.main, packageJsonUrl);\n // Note: fs check redundances will be handled by Descriptor cache here.\n if (fileExists(guess)) return guess\n\n const tries = [\n `./${packageConfig.main}.js`,\n `./${packageConfig.main}.json`,\n `./${packageConfig.main}.node`,\n `./${packageConfig.main}/index.js`,\n `./${packageConfig.main}/index.json`,\n `./${packageConfig.main}/index.node`\n ];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(\n guess,\n packageJsonUrl,\n base,\n packageConfig.main\n );\n return guess\n }\n // Fallthrough.\n }\n\n const tries = ['./index.js', './index.json', './index.node'];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n return guess\n }\n\n // Not found.\n throw new ERR_MODULE_NOT_FOUND(\n fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {URL} resolved\n * @param {URL} base\n * @param {boolean} [preserveSymlinks]\n * @returns {URL}\n */\nfunction finalizeResolution(resolved, base, preserveSymlinks) {\n if (encodedSepRegEx.exec(resolved.pathname) !== null)\n throw new ERR_INVALID_MODULE_SPECIFIER(\n resolved.pathname,\n 'must not include encoded \"/\" or \"\\\\\" characters',\n fileURLToPath(base)\n )\n\n const filePath = fileURLToPath(resolved);\n\n const stats = tryStatSync(\n filePath.endsWith('/') ? filePath.slice(-1) : filePath\n );\n\n if (stats.isDirectory()) {\n const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base));\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!stats.isFile()) {\n throw new ERR_MODULE_NOT_FOUND(\n filePath || resolved.pathname,\n base && fileURLToPath(base),\n 'module'\n )\n }\n\n if (!preserveSymlinks) {\n const real = realpathSync(filePath);\n const {search, hash} = resolved;\n resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? '/' : ''));\n resolved.search = search;\n resolved.hash = hash;\n }\n\n return resolved\n}\n\n/**\n * @param {string} specifier\n * @param {URL | undefined} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction importNotDefined(specifier, packageJsonUrl, base) {\n return new ERR_PACKAGE_IMPORT_NOT_DEFINED(\n specifier,\n packageJsonUrl && fileURLToPath(new URL('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction exportsNotFound(subpath, packageJsonUrl, base) {\n return new ERR_PACKAGE_PATH_NOT_EXPORTED(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {\n const reason = `request is not a valid match in pattern \"${match}\" for the \"${\n internal ? 'imports' : 'exports'\n }\" resolution of ${fileURLToPath(packageJsonUrl)}`;\n throw new ERR_INVALID_MODULE_SPECIFIER(\n request,\n reason,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {unknown} target\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {Error}\n */\nfunction invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {\n target =\n typeof target === 'object' && target !== null\n ? JSON.stringify(target, null, '')\n : `${target}`;\n\n return new ERR_INVALID_PACKAGE_TARGET(\n fileURLToPath(new URL('.', packageJsonUrl)),\n subpath,\n target,\n internal,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} target\n * @param {string} subpath\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction resolvePackageTargetString(\n target,\n subpath,\n match,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (subpath !== '' && !pattern && target[target.length - 1] !== '/')\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (!target.startsWith('./')) {\n if (internal && !target.startsWith('../') && !target.startsWith('/')) {\n let isURL = false;\n\n try {\n new URL(target);\n isURL = true;\n } catch {\n // Continue regardless of error.\n }\n\n if (!isURL) {\n const exportTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target + subpath;\n\n return packageResolve(exportTarget, packageJsonUrl, conditions)\n }\n }\n\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n\n if (invalidSegmentRegEx.exec(target.slice(2)) !== null) {\n if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {\n if (!isPathMap) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n true\n );\n }\n } else {\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n }\n\n const resolved = new URL(target, packageJsonUrl);\n const resolvedPath = resolved.pathname;\n const packagePath = new URL('.', packageJsonUrl).pathname;\n\n if (!resolvedPath.startsWith(packagePath))\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (subpath === '') return resolved\n\n if (invalidSegmentRegEx.exec(subpath) !== null) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {\n if (!isPathMap) {\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n false\n );\n }\n } else {\n throwInvalidSubpath(request, match, packageJsonUrl, internal, base);\n }\n }\n\n if (pattern) {\n return new URL(\n RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n resolved.href,\n () => subpath\n )\n )\n }\n\n return new URL(subpath, resolved)\n}\n\n/**\n * @param {string} key\n * @returns {boolean}\n */\nfunction isArrayIndex(key) {\n const keyNumber = Number(key);\n if (`${keyNumber}` !== key) return false\n return keyNumber >= 0 && keyNumber < 0xff_ff_ff_ff\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {unknown} target\n * @param {string} subpath\n * @param {string} packageSubpath\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set | undefined} conditions\n * @returns {URL | null}\n */\nfunction resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (typeof target === 'string') {\n return resolvePackageTargetString(\n target,\n subpath,\n packageSubpath,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n )\n }\n\n if (Array.isArray(target)) {\n /** @type {Array} */\n const targetList = target;\n if (targetList.length === 0) return null\n\n /** @type {ErrnoException | null | undefined} */\n let lastException;\n let i = -1;\n\n while (++i < targetList.length) {\n const targetItem = targetList[i];\n /** @type {URL | null} */\n let resolveResult;\n try {\n resolveResult = resolvePackageTarget(\n packageJsonUrl,\n targetItem,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n lastException = exception;\n if (exception.code === 'ERR_INVALID_PACKAGE_TARGET') continue\n throw error\n }\n\n if (resolveResult === undefined) continue\n\n if (resolveResult === null) {\n lastException = null;\n continue\n }\n\n return resolveResult\n }\n\n if (lastException === undefined || lastException === null) {\n return null\n }\n\n throw lastException\n }\n\n if (typeof target === 'object' && target !== null) {\n const keys = Object.getOwnPropertyNames(target);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (isArrayIndex(key)) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain numeric property keys.'\n )\n }\n }\n\n i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (key === 'default' || (conditions && conditions.has(key))) {\n // @ts-expect-error: indexable.\n const conditionalTarget = /** @type {unknown} */ (target[key]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n conditionalTarget,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n if (resolveResult === undefined) continue\n return resolveResult\n }\n }\n\n return null\n }\n\n if (target === null) {\n return null\n }\n\n throw invalidPackageTarget(\n packageSubpath,\n target,\n packageJsonUrl,\n internal,\n base\n )\n}\n\n/**\n * @param {unknown} exports\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {boolean}\n */\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n if (typeof exports === 'string' || Array.isArray(exports)) return true\n if (typeof exports !== 'object' || exports === null) return false\n\n const keys = Object.getOwnPropertyNames(exports);\n let isConditionalSugar = false;\n let i = 0;\n let j = -1;\n while (++j < keys.length) {\n const key = keys[j];\n const curIsConditionalSugar = key === '' || key[0] !== '.';\n if (i++ === 0) {\n isConditionalSugar = curIsConditionalSugar;\n } else if (isConditionalSugar !== curIsConditionalSugar) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain some keys starting with \\'.\\' and some not.' +\n ' The exports object must either be an object of package subpath keys' +\n ' or an object of main entry condition name keys only.'\n )\n }\n }\n\n return isConditionalSugar\n}\n\n/**\n * @param {string} match\n * @param {URL} pjsonUrl\n * @param {URL} base\n */\nfunction emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {\n const pjsonPath = fileURLToPath(pjsonUrl);\n if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return\n emittedPackageWarnings.add(pjsonPath + '|' + match);\n process.emitWarning(\n `Use of deprecated trailing slash pattern mapping \"${match}\" in the ` +\n `\"exports\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }. Mapping specifiers ending in \"/\" is no longer supported.`,\n 'DeprecationWarning',\n 'DEP0155'\n );\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {string} packageSubpath\n * @param {Record} packageConfig\n * @param {URL} base\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n) {\n let exports = packageConfig.exports;\n\n if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) {\n exports = {'.': exports};\n }\n\n if (\n own.call(exports, packageSubpath) &&\n !packageSubpath.includes('*') &&\n !packageSubpath.endsWith('/')\n ) {\n // @ts-expect-error: indexable.\n const target = exports[packageSubpath];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n '',\n packageSubpath,\n base,\n false,\n false,\n false,\n conditions\n );\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(exports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (\n patternIndex !== -1 &&\n packageSubpath.startsWith(key.slice(0, patternIndex))\n ) {\n // When this reaches EOL, this can throw at the top of the whole function:\n //\n // if (StringPrototypeEndsWith(packageSubpath, '/'))\n // throwInvalidSubpath(packageSubpath)\n //\n // To match \"imports\" and the spec.\n if (packageSubpath.endsWith('/')) {\n emitTrailingSlashPatternDeprecation(\n packageSubpath,\n packageJsonUrl,\n base\n );\n }\n\n const patternTrailer = key.slice(patternIndex + 1);\n\n if (\n packageSubpath.length >= key.length &&\n packageSubpath.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = packageSubpath.slice(\n patternIndex,\n packageSubpath.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n // @ts-expect-error: indexable.\n const target = /** @type {unknown} */ (exports[bestMatch]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n false,\n packageSubpath.endsWith('/'),\n conditions\n );\n\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n}\n\n/**\n * @param {string} a\n * @param {string} b\n */\nfunction patternKeyCompare(a, b) {\n const aPatternIndex = a.indexOf('*');\n const bPatternIndex = b.indexOf('*');\n const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n if (baseLengthA > baseLengthB) return -1\n if (baseLengthB > baseLengthA) return 1\n if (aPatternIndex === -1) return 1\n if (bPatternIndex === -1) return -1\n if (a.length > b.length) return -1\n if (b.length > a.length) return 1\n return 0\n}\n\n/**\n * @param {string} name\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {URL}\n */\nfunction packageImportsResolve(name, base, conditions) {\n if (name === '#' || name.startsWith('#/') || name.endsWith('/')) {\n const reason = 'is not a valid internal imports specifier name';\n throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base))\n }\n\n /** @type {URL | undefined} */\n let packageJsonUrl;\n\n const packageConfig = getPackageScopeConfig(base);\n\n if (packageConfig.exists) {\n packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n const imports = packageConfig.imports;\n if (imports) {\n if (own.call(imports, name) && !name.includes('*')) {\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n imports[name],\n '',\n name,\n base,\n false,\n true,\n false,\n conditions\n );\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n } else {\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(imports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) {\n const patternTrailer = key.slice(patternIndex + 1);\n if (\n name.length >= key.length &&\n name.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = name.slice(\n patternIndex,\n name.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n const target = imports[bestMatch];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n true,\n false,\n conditions\n );\n\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n }\n }\n }\n }\n\n throw importNotDefined(name, packageJsonUrl, base)\n}\n\n// Note: In Node.js, `getPackageType` is here.\n// To prevent a circular dependency, we move it to\n// `resolve-get-package-type.js`.\n\n/**\n * @param {string} specifier\n * @param {URL} base\n */\nfunction parsePackageName(specifier, base) {\n let separatorIndex = specifier.indexOf('/');\n let validPackageName = true;\n let isScoped = false;\n if (specifier[0] === '@') {\n isScoped = true;\n if (separatorIndex === -1 || specifier.length === 0) {\n validPackageName = false;\n } else {\n separatorIndex = specifier.indexOf('/', separatorIndex + 1);\n }\n }\n\n const packageName =\n separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\n // Package name cannot have leading . and cannot have percent-encoding or\n // \\\\ separators.\n if (invalidPackageNameRegEx.exec(packageName) !== null) {\n validPackageName = false;\n }\n\n if (!validPackageName) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n specifier,\n 'is not a valid package name',\n fileURLToPath(base)\n )\n }\n\n const packageSubpath =\n '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));\n\n return {packageName, packageSubpath, isScoped}\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction packageResolve(specifier, base, conditions) {\n if (builtinModules.includes(specifier)) {\n return new URL('node:' + specifier)\n }\n\n const {packageName, packageSubpath, isScoped} = parsePackageName(\n specifier,\n base\n );\n\n // ResolveSelf\n const packageConfig = getPackageScopeConfig(base);\n\n // Can’t test.\n /* c8 ignore next 16 */\n if (packageConfig.exists) {\n const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n if (\n packageConfig.name === packageName &&\n packageConfig.exports !== undefined &&\n packageConfig.exports !== null\n ) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n }\n\n let packageJsonUrl = new URL(\n './node_modules/' + packageName + '/package.json',\n base\n );\n let packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {string} */\n let lastPath;\n do {\n const stat = tryStatSync(packageJsonPath.slice(0, -13));\n if (!stat.isDirectory()) {\n lastPath = packageJsonPath;\n packageJsonUrl = new URL(\n (isScoped ? '../../../../node_modules/' : '../../../node_modules/') +\n packageName +\n '/package.json',\n packageJsonUrl\n );\n packageJsonPath = fileURLToPath(packageJsonUrl);\n continue\n }\n\n // Package match.\n const packageConfig = getPackageConfig(packageJsonPath, specifier, base);\n if (packageConfig.exports !== undefined && packageConfig.exports !== null) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n\n if (packageSubpath === '.') {\n return legacyMainResolve(packageJsonUrl, packageConfig, base)\n }\n\n return new URL(packageSubpath, packageJsonUrl)\n // Cross-platform root check.\n } while (packageJsonPath.length !== lastPath.length)\n\n throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base))\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction isRelativeSpecifier(specifier) {\n if (specifier[0] === '.') {\n if (specifier.length === 1 || specifier[1] === '/') return true\n if (\n specifier[1] === '.' &&\n (specifier.length === 2 || specifier[2] === '/')\n ) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n if (specifier === '') return false\n if (specifier[0] === '/') return true\n return isRelativeSpecifier(specifier)\n}\n\n/**\n * The “Resolver Algorithm Specification” as detailed in the Node docs (which is\n * sync and slightly lower-level than `resolve`).\n *\n * @param {string} specifier\n * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.\n * @param {URL} base\n * Full URL (to a file) that `specifier` is resolved relative from.\n * @param {Set} [conditions]\n * Conditions.\n * @param {boolean} [preserveSymlinks]\n * Keep symlinks instead of resolving them.\n * @returns {URL}\n * A URL object to the found thing.\n */\nfunction moduleResolve(specifier, base, conditions, preserveSymlinks) {\n const protocol = base.protocol;\n const isRemote = protocol === 'http:' || protocol === 'https:';\n // Order swapped from spec for minor perf gain.\n // Ok since relative URLs cannot parse as URLs.\n /** @type {URL | undefined} */\n let resolved;\n\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n resolved = new URL(specifier, base);\n } else if (!isRemote && specifier[0] === '#') {\n resolved = packageImportsResolve(specifier, base, conditions);\n } else {\n try {\n resolved = new URL(specifier);\n } catch {\n if (!isRemote) {\n resolved = packageResolve(specifier, base, conditions);\n }\n }\n }\n\n assert(resolved !== undefined, 'expected to be defined');\n\n if (resolved.protocol !== 'file:') {\n return resolved\n }\n\n return finalizeResolution(resolved, base, preserveSymlinks)\n}\n\n/**\n * @param {string} specifier\n * @param {URL | undefined} parsed\n * @param {URL | undefined} parsedParentURL\n */\nfunction checkIfDisallowedImport(specifier, parsed, parsedParentURL) {\n if (parsedParentURL) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const parentProtocol = parsedParentURL.protocol;\n\n if (parentProtocol === 'http:' || parentProtocol === 'https:') {\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const parsedProtocol = parsed?.protocol;\n\n // `data:` and `blob:` disallowed due to allowing file: access via\n // indirection\n if (\n parsedProtocol &&\n parsedProtocol !== 'https:' &&\n parsedProtocol !== 'http:'\n ) {\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'remote imports cannot import from a local location.'\n )\n }\n\n return {url: parsed?.href || ''}\n }\n\n if (builtinModules.includes(specifier)) {\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'remote imports cannot import from a local location.'\n )\n }\n\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'only relative and absolute specifiers are supported.'\n )\n }\n }\n}\n\n// Note: this is from:\n// \n/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * @template {unknown} Value\n * @param {Value} self\n * @returns {Value is URL}\n */\nfunction isURL(self) {\n return Boolean(\n self &&\n typeof self === 'object' &&\n 'href' in self &&\n typeof self.href === 'string' &&\n 'protocol' in self &&\n typeof self.protocol === 'string' &&\n self.href &&\n self.protocol\n )\n}\n\n/**\n * Validate user-input in `context` supplied by a custom loader.\n *\n * @param {unknown} parentURL\n * @returns {asserts parentURL is URL | string | undefined}\n */\nfunction throwIfInvalidParentURL(parentURL) {\n if (parentURL === undefined) {\n return // Main entry point, so no parent\n }\n\n if (typeof parentURL !== 'string' && !isURL(parentURL)) {\n throw new codes.ERR_INVALID_ARG_TYPE(\n 'parentURL',\n ['string', 'URL'],\n parentURL\n )\n }\n}\n\n/**\n * @param {URL} url\n */\nfunction throwIfUnsupportedURLProtocol(url) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const protocol = url.protocol;\n\n if (protocol !== 'file:' && protocol !== 'data:' && protocol !== 'node:') {\n throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url)\n }\n}\n\n/**\n * @param {URL | undefined} parsed\n * @param {boolean} experimentalNetworkImports\n */\nfunction throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const protocol = parsed?.protocol;\n\n if (\n protocol &&\n protocol !== 'file:' &&\n protocol !== 'data:' &&\n (!experimentalNetworkImports ||\n (protocol !== 'https:' && protocol !== 'http:'))\n ) {\n throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(\n parsed,\n ['file', 'data'].concat(\n experimentalNetworkImports ? ['https', 'http'] : []\n )\n )\n }\n}\n\n/**\n * @param {string} specifier\n * @param {{parentURL?: string, conditions?: Array}} context\n * @returns {{url: string, format?: string | null}}\n */\nfunction defaultResolve(specifier, context = {}) {\n const {parentURL} = context;\n assert(parentURL !== undefined, 'expected `parentURL` to be defined');\n throwIfInvalidParentURL(parentURL);\n\n /** @type {URL | undefined} */\n let parsedParentURL;\n if (parentURL) {\n try {\n parsedParentURL = new URL(parentURL);\n } catch {\n // Ignore exception\n }\n }\n\n /** @type {URL | undefined} */\n let parsed;\n try {\n parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier)\n ? new URL(specifier, parsedParentURL)\n : new URL(specifier);\n\n // Avoid accessing the `protocol` property due to the lazy getters.\n const protocol = parsed.protocol;\n\n if (\n protocol === 'data:' ||\n (experimentalNetworkImports &&\n (protocol === 'https:' || protocol === 'http:'))\n ) {\n return {url: parsed.href, format: null}\n }\n } catch {\n // Ignore exception\n }\n\n // There are multiple deep branches that can either throw or return; instead\n // of duplicating that deeply nested logic for the possible returns, DRY and\n // check for a return. This seems the least gnarly.\n const maybeReturn = checkIfDisallowedImport(\n specifier,\n parsed,\n parsedParentURL\n );\n\n if (maybeReturn) return maybeReturn\n\n // This must come after checkIfDisallowedImport\n if (parsed && parsed.protocol === 'node:') return {url: specifier}\n\n throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports);\n\n const conditions = getConditionsSet(context.conditions);\n\n const url = moduleResolve(specifier, new URL(parentURL), conditions, false);\n\n throwIfUnsupportedURLProtocol(url);\n\n return {\n // Do NOT cast `url` to a string: that will work even when there are real\n // problems, silencing them\n url: url.href,\n format: defaultGetFormatWithoutErrors(url, {parentURL})\n }\n}\n\n/**\n * @typedef {import('./lib/errors.js').ErrnoException} ErrnoException\n */\n\n/**\n * Match `import.meta.resolve` except that `parent` is required (you can pass\n * `import.meta.url`).\n *\n * @param {string} specifier\n * The module specifier to resolve relative to parent\n * (`/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`,\n * etc).\n * @param {string} parent\n * The absolute parent module URL to resolve from.\n * You must pass `import.meta.url` or something else.\n * @returns {string}\n * Returns a string to a full `file:`, `data:`, or `node:` URL\n * to the found thing.\n */\nfunction resolve(specifier, parent) {\n if (!parent) {\n throw new Error(\n 'Please pass `parent`: `import-meta-resolve` cannot ponyfill that'\n )\n }\n\n try {\n return defaultResolve(specifier, {parentURL: parent}).url\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n\n if (\n exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' &&\n typeof exception.url === 'string'\n ) {\n return exception.url\n }\n\n throw error\n }\n}\n\nexport { moduleResolve, resolve };\n"],"mappings":";;;;;;;AAoFA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAG,uBAAA,CAAAF,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAA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AAA,EAAM,CAER;EAKA,MAAMC,WAAW,GAAGZ,uBAAuB,CACzCxN,SAAS,EACTiG,MAAM,EACNwH,eACF,CAAC;EAED,IAAIW,WAAW,EAAE,OAAOA,WAAW;EAGnC,IAAInI,MAAM,IAAIA,MAAM,CAACpF,QAAQ,KAAK,OAAO,EAAE,OAAO;IAACF,GAAG,EAAEX;EAAS,CAAC;EAElE+N,2BAA2B,CAAC9H,MAAM,EAAEoB,0BAA0B,CAAC;EAE/D,MAAML,UAAU,GAAGD,gBAAgB,CAACN,OAAO,CAACO,UAAU,CAAC;EAEvD,MAAMrG,GAAG,GAAG0M,aAAa,CAACrN,SAAS,EAAE,KAAIkF,UAAG,EAACmD,SAAS,CAAC,EAAErB,UAAU,EAAE,KAAK,CAAC;EAE3E8G,6BAA6B,CAACnN,GAAG,CAAC;EAElC,OAAO;IAGLA,GAAG,EAAEA,GAAG,CAAC2H,IAAI;IACbpF,MAAM,EAAEsD,6BAA6B,CAAC7F,GAAG,EAAE;MAAC0H;IAAS,CAAC;EACxD,CAAC;AACH;AAqBA,SAASgG,OAAOA,CAACrO,SAAS,EAAEsO,MAAM,EAAE;EAClC,IAAI,CAACA,MAAM,EAAE;IACX,MAAM,IAAIlP,KAAK,CACb,kEACF,CAAC;EACH;EAEA,IAAI;IACF,OAAO6O,cAAc,CAACjO,SAAS,EAAE;MAACqI,SAAS,EAAEiG;IAAM,CAAC,CAAC,CAAC3N,GAAG;EAC3D,CAAC,CAAC,OAAOY,KAAK,EAAE;IACd,MAAMyC,SAAS,GAAkCzC,KAAM;IAEvD,IACEyC,SAAS,CAACjC,IAAI,KAAK,4BAA4B,IAC/C,OAAOiC,SAAS,CAACrD,GAAG,KAAK,QAAQ,EACjC;MACA,OAAOqD,SAAS,CAACrD,GAAG;IACtB;IAEA,MAAMY,KAAK;EACb;AACF;AAAC"} \ No newline at end of file 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 index 5b2a57a7..cf70a04e 100644 --- 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 @@ -5,15 +5,8 @@ Object.defineProperty(exports, "__esModule", { }); exports.codeFrameColumns = codeFrameColumns; exports.default = _default; - -var _highlight = _interopRequireWildcard(require("@babel/highlight")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +var _highlight = require("@babel/highlight"); let deprecationWarningShown = false; - function getDefs(chalk) { return { gutter: chalk.grey, @@ -21,9 +14,7 @@ function getDefs(chalk) { message: chalk.red.bold }; } - const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - function getMarkerLines(loc, source, opts) { const startLoc = Object.assign({ column: 0, @@ -40,22 +31,17 @@ function getMarkerLines(loc, source, opts) { 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) { @@ -79,23 +65,19 @@ function getMarkerLines(loc, source, opts) { 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; }; - const lines = rawLines.split(NEWLINE); const { start, @@ -105,48 +87,40 @@ function codeFrameColumns(rawLines, loc, opts = {}) { const hasColumns = loc.start && typeof loc.start.column === "number"; const numberMaxWidth = String(end).length; const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { + let frame = highlightedLines.split(NEWLINE, end).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.length > 0 ? ` ${line}` : "", markerLine].join(""); } else { return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${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 { @@ -155,7 +129,6 @@ function _default(rawLines, lineNumber, colNumber, opts = {}) { console.warn(new Error(message)); } } - colNumber = Math.max(colNumber, 0); const location = { start: { @@ -164,4 +137,6 @@ function _default(rawLines, lineNumber, colNumber, opts = {}) { } }; return codeFrameColumns(rawLines, location, opts); -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js.map b/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js.map new file mode 100644 index 00000000..68d399e1 --- /dev/null +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_highlight","require","deprecationWarningShown","getDefs","chalk","gutter","grey","marker","red","bold","message","NEWLINE","getMarkerLines","loc","source","opts","startLoc","Object","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","codeFrameColumns","rawLines","highlighted","highlightCode","forceColor","shouldHighlight","getChalk","defs","maybeHighlight","chalkFn","string","lines","split","hasColumns","numberMaxWidth","String","highlightedLines","highlight","frame","slice","map","index","number","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","join","reset","_default","colNumber","process","emitWarning","deprecationError","Error","name","console","warn","location"],"sources":["../src/index.ts"],"sourcesContent":["import highlight, { shouldHighlight, getChalk } from \"@babel/highlight\";\n\ntype Chalk = ReturnType;\n\nlet deprecationWarningShown = false;\n\ntype Location = {\n column: number;\n line: number;\n};\n\ntype NodeLocation = {\n end?: Location;\n start: Location;\n};\n\nexport interface Options {\n /** Syntax highlight the code as JavaScript for terminals. default: false */\n highlightCode?: boolean;\n /** The number of lines to show above the error. default: 2 */\n linesAbove?: number;\n /** The number of lines to show below the error. default: 3 */\n linesBelow?: number;\n /**\n * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n * overrides highlightCode.\n * default: false\n */\n forceColor?: boolean;\n /**\n * Pass in a string to be displayed inline (if possible) next to the\n * highlighted location in the code. If it can't be positioned inline,\n * it will be placed above the code frame.\n * default: nothing\n */\n message?: string;\n}\n\n/**\n * Chalk styles for code frame token types.\n */\nfunction getDefs(chalk: Chalk) {\n return {\n gutter: chalk.grey,\n marker: chalk.red.bold,\n message: chalk.red.bold,\n };\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * Extract what lines should be marked and highlighted.\n */\n\ntype MarkerLines = Record;\n\nfunction getMarkerLines(\n loc: NodeLocation,\n source: Array,\n opts: Options,\n): {\n start: number;\n end: number;\n markerLines: MarkerLines;\n} {\n const startLoc: Location = {\n column: 0,\n line: -1,\n ...loc.start,\n };\n const endLoc: Location = {\n ...startLoc,\n ...loc.end,\n };\n const { linesAbove = 2, linesBelow = 3 } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines: MarkerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return { start, end, markerLines };\n}\n\nexport function codeFrameColumns(\n rawLines: string,\n loc: NodeLocation,\n opts: Options = {},\n): string {\n const highlighted =\n (opts.highlightCode || opts.forceColor) && shouldHighlight(opts);\n const chalk = getChalk(opts);\n const defs = getDefs(chalk);\n const maybeHighlight = (chalkFn: Chalk, string: string) => {\n return highlighted ? chalkFn(string) : string;\n };\n const lines = rawLines.split(NEWLINE);\n const { start, end, markerLines } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n\n const numberMaxWidth = String(end).length;\n\n const highlightedLines = highlighted ? highlight(rawLines, opts) : rawLines;\n\n let frame = highlightedLines\n .split(NEWLINE, end)\n .slice(start, end)\n .map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line\n .slice(0, Math.max(hasMarker[0] - 1, 0))\n .replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n\n markerLine = [\n \"\\n \",\n maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")),\n \" \",\n markerSpacing,\n maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers),\n ].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n return [\n maybeHighlight(defs.marker, \">\"),\n maybeHighlight(defs.gutter, gutter),\n line.length > 0 ? ` ${line}` : \"\",\n markerLine,\n ].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${\n line.length > 0 ? ` ${line}` : \"\"\n }`;\n }\n })\n .join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return chalk.reset(frame);\n } else {\n return frame;\n }\n}\n\n/**\n * Create a code frame, adding line numbers, code highlighting, and pointing to a given position.\n */\n\nexport default function (\n rawLines: string,\n lineNumber: number,\n colNumber?: number | null,\n opts: Options = {},\n): string {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n\n const message =\n \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n // A string is directly supplied to emitWarning, because when supplying an\n // Error object node throws in the tests because of different contexts\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n\n const location: NodeLocation = {\n start: { column: colNumber, line: lineNumber },\n };\n\n return codeFrameColumns(rawLines, location, opts);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIA,IAAIC,uBAAuB,GAAG,KAAK;AAqCnC,SAASC,OAAOA,CAACC,KAAY,EAAE;EAC7B,OAAO;IACLC,MAAM,EAAED,KAAK,CAACE,IAAI;IAClBC,MAAM,EAAEH,KAAK,CAACI,GAAG,CAACC,IAAI;IACtBC,OAAO,EAAEN,KAAK,CAACI,GAAG,CAACC;EACrB,CAAC;AACH;AAMA,MAAME,OAAO,GAAG,yBAAyB;AAQzC,SAASC,cAAcA,CACrBC,GAAiB,EACjBC,MAAqB,EACrBC,IAAa,EAKb;EACA,MAAMC,QAAkB,GAAAC,MAAA,CAAAC,MAAA;IACtBC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;EAAC,GACLP,GAAG,CAACQ,KAAK,CACb;EACD,MAAMC,MAAgB,GAAAL,MAAA,CAAAC,MAAA,KACjBF,QAAQ,EACRH,GAAG,CAACU,GAAG,CACX;EAC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,SACblC,QAAgB,EAChBH,UAAkB,EAClBsC,SAAyB,EACzB5D,IAAa,GAAG,CAAC,CAAC,EACV;EACR,IAAI,CAACb,uBAAuB,EAAE;IAC5BA,uBAAuB,GAAG,IAAI;IAE9B,MAAMQ,OAAO,GACX,qGAAqG;IAEvG,IAAIkE,OAAO,CAACC,WAAW,EAAE;MAGvBD,OAAO,CAACC,WAAW,CAACnE,OAAO,EAAE,oBAAoB,CAAC;IACpD,CAAC,MAAM;MACL,MAAMoE,gBAAgB,GAAG,IAAIC,KAAK,CAACrE,OAAO,CAAC;MAC3CoE,gBAAgB,CAACE,IAAI,GAAG,oBAAoB;MAC5CC,OAAO,CAACC,IAAI,CAAC,IAAIH,KAAK,CAACrE,OAAO,CAAC,CAAC;IAClC;EACF;EAEAiE,SAAS,GAAG7C,IAAI,CAACC,GAAG,CAAC4C,SAAS,EAAE,CAAC,CAAC;EAElC,MAAMQ,QAAsB,GAAG;IAC7B9D,KAAK,EAAE;MAAEF,MAAM,EAAEwD,SAAS;MAAEvD,IAAI,EAAEiB;IAAW;EAC/C,CAAC;EAED,OAAOE,gBAAgB,CAACC,QAAQ,EAAE2C,QAAQ,EAAEpE,IAAI,CAAC;AACnD"} \ 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 index e6bd0433..34b8f5ad 100644 --- a/node_modules/@babel/core/node_modules/@babel/code-frame/package.json +++ b/node_modules/@babel/core/node_modules/@babel/code-frame/package.json @@ -1,57 +1,28 @@ { - "_from": "@babel/code-frame@^7.12.13", - "_id": "@babel/code-frame@7.12.13", - "_inBundle": false, - "_integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "_location": "/@babel/core/@babel/code-frame", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/code-frame@^7.12.13", - "name": "@babel/code-frame", - "escapedName": "@babel%2fcode-frame", - "scope": "@babel", - "rawSpec": "^7.12.13", - "saveSpec": null, - "fetchSpec": "^7.12.13" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "_shasum": "dcfc826beef65e75c50e21d3837d7d95798dd658", - "_spec": "@babel/code-frame@^7.12.13", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/highlight": "^7.12.13" - }, - "deprecated": false, + "name": "@babel/code-frame", + "version": "7.21.4", "description": "Generate errors that contain a code frame that point to source locations.", - "devDependencies": { - "@types/chalk": "^2.0.0", - "chalk": "^2.0.0", - "strip-ansi": "^4.0.0" - }, + "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-code-frame", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen", "license": "MIT", - "main": "lib/index.js", - "name": "@babel/code-frame", "publishConfig": { "access": "public" }, "repository": { "type": "git", - "url": "git+https://github.com/babel/babel.git", + "url": "https://github.com/babel/babel.git", "directory": "packages/babel-code-frame" }, - "version": "7.12.13" -} + "main": "./lib/index.js", + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "devDependencies": { + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/convert-source-map/LICENSE b/node_modules/@babel/core/node_modules/convert-source-map/LICENSE new file mode 100644 index 00000000..41702c50 --- /dev/null +++ b/node_modules/@babel/core/node_modules/convert-source-map/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +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/convert-source-map/README.md b/node_modules/@babel/core/node_modules/convert-source-map/README.md new file mode 100644 index 00000000..7a3a9452 --- /dev/null +++ b/node_modules/@babel/core/node_modules/convert-source-map/README.md @@ -0,0 +1,123 @@ +# convert-source-map [![Build Status][ci-image]][ci-url] + +Converts a source-map from/to different formats and allows adding/changing properties. + +```js +var convert = require('convert-source-map'); + +var json = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .toJSON(); + +var modified = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .setProperty('sources', [ 'SRC/FOO.JS' ]) + .toJSON(); + +console.log(json); +console.log(modified); +``` + +```json +{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +``` + +## API + +### fromObject(obj) + +Returns source map converter from given object. + +### fromJSON(json) + +Returns source map converter from given json string. + +### fromBase64(base64) + +Returns source map converter from given base64 encoded json string. + +### fromComment(comment) + +Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. + +### fromMapFileComment(comment, mapFileDir) + +Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. + +`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the +generated file, i.e. the one containing the source map. + +### fromSource(source) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. + +### fromMapFileSource(source, mapFileDir) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was +found. + +The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see +fromMapFileComment. + +### toObject() + +Returns a copy of the underlying source map. + +### toJSON([space]) + +Converts source map to json string. If `space` is given (optional), this will be passed to +[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the +JSON string is generated. + +### toBase64() + +Converts source map to base64 encoded json string. + +### toComment([options]) + +Converts source map to an inline comment that can be appended to the source-file. + +By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would +normally see in a JS source file. + +When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. + +### addProperty(key, value) + +Adds given property to the source map. Throws an error if property already exists. + +### setProperty(key, value) + +Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. + +### getProperty(key) + +Gets given property of the source map. + +### removeComments(src) + +Returns `src` with all source map comments removed + +### removeMapFileComments(src) + +Returns `src` with all source map comments pointing to map files removed. + +### commentRegex + +Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments. + +### mapFileCommentRegex + +Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files. + +### generateMapFileComment(file, [options]) + +Returns a comment that links to an external source map via `file`. + +By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file. + +When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. + +[ci-url]: https://github.com/thlorenz/convert-source-map/actions?query=workflow:ci +[ci-image]: https://img.shields.io/github/workflow/status/thlorenz/convert-source-map/CI?style=flat-square diff --git a/node_modules/@babel/core/node_modules/convert-source-map/index.js b/node_modules/@babel/core/node_modules/convert-source-map/index.js new file mode 100644 index 00000000..dc602d7c --- /dev/null +++ b/node_modules/@babel/core/node_modules/convert-source-map/index.js @@ -0,0 +1,179 @@ +'use strict'; +var fs = require('fs'); +var path = require('path'); + +Object.defineProperty(exports, 'commentRegex', { + get: function getCommentRegex () { + return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg; + } +}); + +Object.defineProperty(exports, 'mapFileCommentRegex', { + get: function getMapFileCommentRegex () { + // Matches sourceMappingURL in either // or /* comment styles. + return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg; + } +}); + +var decodeBase64; +if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + decodeBase64 = decodeBase64WithBufferFrom; + } else { + decodeBase64 = decodeBase64WithNewBuffer; + } +} else { + decodeBase64 = decodeBase64WithAtob; +} + +function decodeBase64WithBufferFrom(base64) { + return Buffer.from(base64, 'base64').toString(); +} + +function decodeBase64WithNewBuffer(base64) { + if (typeof value === 'number') { + throw new TypeError('The value to decode must not be of type number.'); + } + return new Buffer(base64, 'base64').toString(); +} + +function decodeBase64WithAtob(base64) { + return decodeURIComponent(escape(atob(base64))); +} + +function stripComment(sm) { + return sm.split(',').pop(); +} + +function readFromFileMap(sm, dir) { + // NOTE: this will only work on the server since it attempts to read the map file + + var r = exports.mapFileCommentRegex.exec(sm); + + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + var filepath = path.resolve(dir, filename); + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (e) { + throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); + } +} + +function Converter (sm, opts) { + opts = opts || {}; + + if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); + if (opts.hasComment) sm = stripComment(sm); + if (opts.isEncoded) sm = decodeBase64(sm); + if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); + + this.sourcemap = sm; +} + +Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); +}; + +if (typeof Buffer !== 'undefined') { + if (typeof Buffer.from === 'function') { + Converter.prototype.toBase64 = encodeBase64WithBufferFrom; + } else { + Converter.prototype.toBase64 = encodeBase64WithNewBuffer; + } +} else { + Converter.prototype.toBase64 = encodeBase64WithBtoa; +} + +function encodeBase64WithBufferFrom() { + var json = this.toJSON(); + return Buffer.from(json, 'utf8').toString('base64'); +} + +function encodeBase64WithNewBuffer() { + var json = this.toJSON(); + if (typeof json === 'number') { + throw new TypeError('The json to encode must not be of type number.'); + } + return new Buffer(json, 'utf8').toString('base64'); +} + +function encodeBase64WithBtoa() { + var json = this.toJSON(); + return btoa(unescape(encodeURIComponent(json))); +} + +Converter.prototype.toComment = function (options) { + var base64 = this.toBase64(); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; + +// returns copy instead of original +Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); +}; + +Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); +}; + +Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; +}; + +Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; +}; + +exports.fromObject = function (obj) { + return new Converter(obj); +}; + +exports.fromJSON = function (json) { + return new Converter(json, { isJSON: true }); +}; + +exports.fromBase64 = function (base64) { + return new Converter(base64, { isEncoded: true }); +}; + +exports.fromComment = function (comment) { + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); + + return new Converter(comment, { isEncoded: true, hasComment: true }); +}; + +exports.fromMapFileComment = function (comment, dir) { + return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromSource = function (content) { + var m = content.match(exports.commentRegex); + return m ? exports.fromComment(m.pop()) : null; +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromMapFileSource = function (content, dir) { + var m = content.match(exports.mapFileCommentRegex); + return m ? exports.fromMapFileComment(m.pop(), dir) : null; +}; + +exports.removeComments = function (src) { + return src.replace(exports.commentRegex, ''); +}; + +exports.removeMapFileComments = function (src) { + return src.replace(exports.mapFileCommentRegex, ''); +}; + +exports.generateMapFileComment = function (file, options) { + var data = 'sourceMappingURL=' + file; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; diff --git a/node_modules/@babel/core/node_modules/convert-source-map/package.json b/node_modules/@babel/core/node_modules/convert-source-map/package.json new file mode 100644 index 00000000..0d796cac --- /dev/null +++ b/node_modules/@babel/core/node_modules/convert-source-map/package.json @@ -0,0 +1,41 @@ +{ + "name": "convert-source-map", + "version": "1.9.0", + "description": "Converts a source-map from/to different formats and allows adding/changing properties.", + "main": "index.js", + "scripts": { + "test": "tap test/*.js --color" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/convert-source-map.git" + }, + "homepage": "https://github.com/thlorenz/convert-source-map", + "devDependencies": { + "inline-source-map": "~0.6.2", + "tap": "~9.0.0" + }, + "keywords": [ + "convert", + "sourcemap", + "source", + "map", + "browser", + "debug" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "license": "MIT", + "engine": { + "node": ">=0.6" + }, + "files": [ + "index.js" + ], + "browser": { + "fs": false + } +} diff --git a/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md b/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/@babel/core/node_modules/source-map/LICENSE b/node_modules/@babel/core/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/@babel/core/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and 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. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may 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 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/@babel/core/node_modules/source-map/README.md b/node_modules/@babel/core/node_modules/source-map/README.md deleted file mode 100644 index 32813394..00000000 --- a/node_modules/@babel/core/node_modules/source-map/README.md +++ /dev/null @@ -1,729 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab6382..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2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xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICA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dW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXR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YXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbn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NlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ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bDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e29..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd0..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/lib/array-set.js b/node_modules/@babel/core/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js b/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/base64.js b/node_modules/@babel/core/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js b/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js b/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js b/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js b/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc280..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js b/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7fb..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-node.js b/node_modules/@babel/core/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53f..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/util.js b/node_modules/@babel/core/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e452..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/@babel/core/node_modules/source-map/package.json b/node_modules/@babel/core/node_modules/source-map/package.json deleted file mode 100644 index 1cf52bfb..00000000 --- a/node_modules/@babel/core/node_modules/source-map/package.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "_from": "source-map@^0.5.0", - "_id": "source-map@0.5.7", - "_inBundle": false, - "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "_location": "/@babel/core/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "source-map@^0.5.0", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "^0.5.0", - "saveSpec": null, - "fetchSpec": "^0.5.0" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", - "_spec": "source-map@^0.5.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/core", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "deprecated": false, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/node_modules/@babel/core/node_modules/source-map/source-map.js b/node_modules/@babel/core/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/@babel/core/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json index 99d9551f..cb1431f2 100644 --- a/node_modules/@babel/core/package.json +++ b/node_modules/@babel/core/package.json @@ -1,80 +1,20 @@ { - "_from": "@babel/core@^7.1.0", - "_id": "@babel/core@7.13.14", - "_inBundle": false, - "_integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", - "_location": "/@babel/core", - "_phantomChildren": { - "@babel/highlight": "7.13.10" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/core@^7.1.0", - "name": "@babel/core", - "escapedName": "@babel%2fcore", - "scope": "@babel", - "rawSpec": "^7.1.0", - "saveSpec": null, - "fetchSpec": "^7.1.0" - }, - "_requiredBy": [ - "/@jest/transform", - "/istanbul-lib-instrument", - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "_shasum": "8e46ebbaca460a63497c797e574038ab04ae6d06", - "_spec": "@babel/core@^7.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@jest/transform", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "browser": { - "./lib/config/files/index.js": "./lib/config/files/index-browser.js", - "./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js", - "./lib/transform-file.js": "./lib/transform-file-browser.js", - "./lib/transformation/util/clone-deep.js": "./lib/transformation/util/clone-deep-browser.js", - "./src/config/files/index.js": "./src/config/files/index-browser.js", - "./src/config/resolve-targets.js": "./src/config/resolve-targets-browser.js", - "./src/transform-file.js": "./src/transform-file-browser.js", - "./src/transformation/util/clone-deep.js": "./src/transformation/util/clone-deep-browser.js" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "deprecated": false, + "name": "@babel/core", + "version": "7.22.1", "description": "Babel compiler core.", - "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "7.13.14" - }, - "engines": { - "node": ">=6.9.0" + "main": "./lib/index.js", + "author": "The Babel Team (https://babel.dev/team)", + "license": "MIT", + "publishConfig": { + "access": "public" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-core" }, "homepage": "https://babel.dev/docs/en/next/babel-core", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen", "keywords": [ "6to5", "babel", @@ -90,16 +30,53 @@ "babel-core", "compiler" ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/core", - "publishConfig": { - "access": "public" + "engines": { + "node": ">=6.9.0" }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-core" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + }, + "browser": { + "./lib/config/files/index.js": "./lib/config/files/index-browser.js", + "./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js", + "./lib/transform-file.js": "./lib/transform-file-browser.js", + "./src/config/files/index.ts": "./src/config/files/index-browser.ts", + "./src/config/resolve-targets.ts": "./src/config/resolve-targets-browser.ts", + "./src/transform-file.ts": "./src/transform-file-browser.ts" + }, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.22.0", + "@babel/helper-compilation-targets": "^7.22.1", + "@babel/helper-module-transforms": "^7.22.1", + "@babel/helpers": "^7.22.0", + "@babel/parser": "^7.22.0", + "@babel/template": "^7.21.9", + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.0" + }, + "devDependencies": { + "@babel/helper-transform-fixture-test-runner": "^7.22.0", + "@babel/plugin-syntax-flow": "^7.21.4", + "@babel/plugin-transform-flow-strip-types": "^7.21.0", + "@babel/plugin-transform-modules-commonjs": "^7.21.5", + "@babel/preset-env": "^7.22.1", + "@babel/preset-typescript": "^7.21.5", + "@jridgewell/trace-mapping": "^0.3.17", + "@types/convert-source-map": "^1.5.1", + "@types/debug": "^4.1.0", + "@types/gensync": "^1.0.0", + "@types/resolve": "^1.3.2", + "@types/semver": "^5.4.0", + "rimraf": "^3.0.0", + "ts-node": "^10.9.1" }, - "version": "7.13.14" -} + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/core/src/config/files/index-browser.js b/node_modules/@babel/core/src/config/files/index-browser.js deleted file mode 100644 index cdac53a6..00000000 --- a/node_modules/@babel/core/src/config/files/index-browser.js +++ /dev/null @@ -1,96 +0,0 @@ -// @flow - -import type { Handler } from "gensync"; - -import type { - ConfigFile, - IgnoreFile, - RelativeConfig, - FilePackageData, -} from "./types"; - -import type { CallerMetadata } from "../validation/options"; - -export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData }; - -// eslint-disable-next-line require-yield -export function* findConfigUpwards( - rootDir: string, // eslint-disable-line no-unused-vars -): Handler { - return null; -} - -// eslint-disable-next-line require-yield -export function* findPackageData(filepath: string): Handler { - return { - filepath, - directories: [], - pkg: null, - isPackage: false, - }; -} - -// eslint-disable-next-line require-yield -export function* findRelativeConfig( - pkgData: FilePackageData, // eslint-disable-line no-unused-vars - envName: string, // eslint-disable-line no-unused-vars - caller: CallerMetadata | void, // eslint-disable-line no-unused-vars -): Handler { - return { pkg: null, config: null, ignore: null }; -} - -// eslint-disable-next-line require-yield -export function* findRootConfig( - dirname: string, // eslint-disable-line no-unused-vars - envName: string, // eslint-disable-line no-unused-vars - caller: CallerMetadata | void, // eslint-disable-line no-unused-vars -): Handler { - return null; -} - -// eslint-disable-next-line require-yield -export function* loadConfig( - name: string, - dirname: string, - envName: string, // eslint-disable-line no-unused-vars - caller: CallerMetadata | void, // eslint-disable-line no-unused-vars -): Handler { - throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); -} - -// eslint-disable-next-line require-yield -export function* resolveShowConfigPath( - dirname: string, // eslint-disable-line no-unused-vars -): Handler { - return null; -} - -export const ROOT_CONFIG_FILENAMES = []; - -// eslint-disable-next-line no-unused-vars -export function resolvePlugin(name: string, dirname: string): string | null { - return null; -} - -// eslint-disable-next-line no-unused-vars -export function resolvePreset(name: string, dirname: string): string | null { - return null; -} - -export function loadPlugin( - name: string, - dirname: string, -): Handler<{ filepath: string, value: mixed }> { - throw new Error( - `Cannot load plugin ${name} relative to ${dirname} in a browser`, - ); -} - -export function loadPreset( - name: string, - dirname: string, -): Handler<{ filepath: string, value: mixed }> { - throw new Error( - `Cannot load preset ${name} relative to ${dirname} in a browser`, - ); -} diff --git a/node_modules/@babel/core/src/config/files/index-browser.ts b/node_modules/@babel/core/src/config/files/index-browser.ts new file mode 100644 index 00000000..08f91f6a --- /dev/null +++ b/node_modules/@babel/core/src/config/files/index-browser.ts @@ -0,0 +1,109 @@ +import type { Handler } from "gensync"; + +import type { + ConfigFile, + IgnoreFile, + RelativeConfig, + FilePackageData, +} from "./types"; + +import type { CallerMetadata } from "../validation/options"; + +export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData }; + +export function findConfigUpwards( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + rootDir: string, +): string | null { + return null; +} + +// eslint-disable-next-line require-yield +export function* findPackageData(filepath: string): Handler { + return { + filepath, + directories: [], + pkg: null, + isPackage: false, + }; +} + +// eslint-disable-next-line require-yield +export function* findRelativeConfig( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + pkgData: FilePackageData, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + envName: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + caller: CallerMetadata | undefined, +): Handler { + return { config: null, ignore: null }; +} + +// eslint-disable-next-line require-yield +export function* findRootConfig( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + dirname: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + envName: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + caller: CallerMetadata | undefined, +): Handler { + return null; +} + +// eslint-disable-next-line require-yield +export function* loadConfig( + name: string, + dirname: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + envName: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + caller: CallerMetadata | undefined, +): Handler { + throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); +} + +// eslint-disable-next-line require-yield +export function* resolveShowConfigPath( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + dirname: string, +): Handler { + return null; +} + +export const ROOT_CONFIG_FILENAMES: string[] = []; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function resolvePlugin(name: string, dirname: string): string | null { + return null; +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function resolvePreset(name: string, dirname: string): string | null { + return null; +} + +export function loadPlugin( + name: string, + dirname: string, +): Handler<{ + filepath: string; + value: unknown; +}> { + throw new Error( + `Cannot load plugin ${name} relative to ${dirname} in a browser`, + ); +} + +export function loadPreset( + name: string, + dirname: string, +): Handler<{ + filepath: string; + value: unknown; +}> { + throw new Error( + `Cannot load preset ${name} relative to ${dirname} in a browser`, + ); +} diff --git a/node_modules/@babel/core/src/config/files/index.js b/node_modules/@babel/core/src/config/files/index.js deleted file mode 100644 index 2321fb76..00000000 --- a/node_modules/@babel/core/src/config/files/index.js +++ /dev/null @@ -1,31 +0,0 @@ -// @flow - -import typeof * as indexBrowserType from "./index-browser"; -import typeof * as indexType from "./index"; - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of index-browser, since this file may be replaced at bundle time with index-browser. -((({}: any): $Exact): $Exact); - -export { findPackageData } from "./package"; - -export { - findConfigUpwards, - findRelativeConfig, - findRootConfig, - loadConfig, - resolveShowConfigPath, - ROOT_CONFIG_FILENAMES, -} from "./configuration"; -export type { - ConfigFile, - IgnoreFile, - RelativeConfig, - FilePackageData, -} from "./types"; -export { - resolvePlugin, - resolvePreset, - loadPlugin, - loadPreset, -} from "./plugins"; diff --git a/node_modules/@babel/core/src/config/files/index.ts b/node_modules/@babel/core/src/config/files/index.ts new file mode 100644 index 00000000..55f68cb7 --- /dev/null +++ b/node_modules/@babel/core/src/config/files/index.ts @@ -0,0 +1,29 @@ +type indexBrowserType = typeof import("./index-browser"); +type indexType = typeof import("./index"); + +// Kind of gross, but essentially asserting that the exports of this module are the same as the +// exports of index-browser, since this file may be replaced at bundle time with index-browser. +({}) as any as indexBrowserType as indexType; + +export { findPackageData } from "./package"; + +export { + findConfigUpwards, + findRelativeConfig, + findRootConfig, + loadConfig, + resolveShowConfigPath, + ROOT_CONFIG_FILENAMES, +} from "./configuration"; +export type { + ConfigFile, + IgnoreFile, + RelativeConfig, + FilePackageData, +} from "./types"; +export { + loadPlugin, + loadPreset, + resolvePlugin, + resolvePreset, +} from "./plugins"; diff --git a/node_modules/@babel/core/src/config/resolve-targets-browser.js b/node_modules/@babel/core/src/config/resolve-targets-browser.js deleted file mode 100644 index 1b8c4342..00000000 --- a/node_modules/@babel/core/src/config/resolve-targets-browser.js +++ /dev/null @@ -1,33 +0,0 @@ -// @flow - -import type { ValidatedOptions } from "./validation/options"; -import getTargets, { type Targets } from "@babel/helper-compilation-targets"; - -export function resolveBrowserslistConfigFile( - // eslint-disable-next-line no-unused-vars - browserslistConfigFile: string, - // eslint-disable-next-line no-unused-vars - configFilePath: string, -): string | void { - return undefined; -} - -export function resolveTargets( - options: ValidatedOptions, - // eslint-disable-next-line no-unused-vars - root: string, -): Targets { - let { targets } = options; - if (typeof targets === "string" || Array.isArray(targets)) { - targets = { browsers: targets }; - } - // $FlowIgnore it thinks that targets.esmodules doesn't exist. - if (targets && targets.esmodules) { - targets = { ...targets, esmodules: "intersect" }; - } - - return getTargets((targets: any), { - ignoreBrowserslistConfig: true, - browserslistEnv: options.browserslistEnv, - }); -} diff --git a/node_modules/@babel/core/src/config/resolve-targets-browser.ts b/node_modules/@babel/core/src/config/resolve-targets-browser.ts new file mode 100644 index 00000000..60745dd7 --- /dev/null +++ b/node_modules/@babel/core/src/config/resolve-targets-browser.ts @@ -0,0 +1,40 @@ +import type { ValidatedOptions } from "./validation/options"; +import getTargets, { + type InputTargets, +} from "@babel/helper-compilation-targets"; + +import type { Targets } from "@babel/helper-compilation-targets"; + +export function resolveBrowserslistConfigFile( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + browserslistConfigFile: string, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + configFilePath: string, +): string | void { + return undefined; +} + +export function resolveTargets( + options: ValidatedOptions, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + root: string, +): Targets { + const optTargets = options.targets; + let targets: InputTargets; + + if (typeof optTargets === "string" || Array.isArray(optTargets)) { + targets = { browsers: optTargets }; + } else if (optTargets) { + if ("esmodules" in optTargets) { + targets = { ...optTargets, esmodules: "intersect" }; + } else { + // https://github.com/microsoft/TypeScript/issues/17002 + targets = optTargets as InputTargets; + } + } + + return getTargets(targets, { + ignoreBrowserslistConfig: true, + browserslistEnv: options.browserslistEnv, + }); +} diff --git a/node_modules/@babel/core/src/config/resolve-targets.js b/node_modules/@babel/core/src/config/resolve-targets.js deleted file mode 100644 index 72361f27..00000000 --- a/node_modules/@babel/core/src/config/resolve-targets.js +++ /dev/null @@ -1,49 +0,0 @@ -// @flow - -import typeof * as browserType from "./resolve-targets-browser"; -import typeof * as nodeType from "./resolve-targets"; - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of index-browser, since this file may be replaced at bundle time with index-browser. -((({}: any): $Exact): $Exact); - -import type { ValidatedOptions } from "./validation/options"; -import path from "path"; -import getTargets, { type Targets } from "@babel/helper-compilation-targets"; - -export function resolveBrowserslistConfigFile( - browserslistConfigFile: string, - configFileDir: string, -): string | void { - return path.resolve(configFileDir, browserslistConfigFile); -} - -export function resolveTargets( - options: ValidatedOptions, - root: string, -): Targets { - let { targets } = options; - if (typeof targets === "string" || Array.isArray(targets)) { - targets = { browsers: targets }; - } - // $FlowIgnore it thinks that targets.esmodules doesn't exist. - if (targets && targets.esmodules) { - targets = { ...targets, esmodules: "intersect" }; - } - - const { browserslistConfigFile } = options; - let configFile; - let ignoreBrowserslistConfig = false; - if (typeof browserslistConfigFile === "string") { - configFile = browserslistConfigFile; - } else { - ignoreBrowserslistConfig = browserslistConfigFile === false; - } - - return getTargets((targets: any), { - ignoreBrowserslistConfig, - configFile, - configPath: root, - browserslistEnv: options.browserslistEnv, - }); -} diff --git a/node_modules/@babel/core/src/config/resolve-targets.ts b/node_modules/@babel/core/src/config/resolve-targets.ts new file mode 100644 index 00000000..04c7fec4 --- /dev/null +++ b/node_modules/@babel/core/src/config/resolve-targets.ts @@ -0,0 +1,56 @@ +type browserType = typeof import("./resolve-targets-browser"); +type nodeType = typeof import("./resolve-targets"); + +// Kind of gross, but essentially asserting that the exports of this module are the same as the +// exports of index-browser, since this file may be replaced at bundle time with index-browser. +({}) as any as browserType as nodeType; + +import type { ValidatedOptions } from "./validation/options"; +import path from "path"; +import getTargets, { + type InputTargets, +} from "@babel/helper-compilation-targets"; + +import type { Targets } from "@babel/helper-compilation-targets"; + +export function resolveBrowserslistConfigFile( + browserslistConfigFile: string, + configFileDir: string, +): string | undefined { + return path.resolve(configFileDir, browserslistConfigFile); +} + +export function resolveTargets( + options: ValidatedOptions, + root: string, +): Targets { + const optTargets = options.targets; + let targets: InputTargets; + + if (typeof optTargets === "string" || Array.isArray(optTargets)) { + targets = { browsers: optTargets }; + } else if (optTargets) { + if ("esmodules" in optTargets) { + targets = { ...optTargets, esmodules: "intersect" }; + } else { + // https://github.com/microsoft/TypeScript/issues/17002 + targets = optTargets as InputTargets; + } + } + + const { browserslistConfigFile } = options; + let configFile; + let ignoreBrowserslistConfig = false; + if (typeof browserslistConfigFile === "string") { + configFile = browserslistConfigFile; + } else { + ignoreBrowserslistConfig = browserslistConfigFile === false; + } + + return getTargets(targets, { + ignoreBrowserslistConfig, + configFile, + configPath: root, + browserslistEnv: options.browserslistEnv, + }); +} diff --git a/node_modules/@babel/core/src/transform-file-browser.js b/node_modules/@babel/core/src/transform-file-browser.js deleted file mode 100644 index fc1b12af..00000000 --- a/node_modules/@babel/core/src/transform-file-browser.js +++ /dev/null @@ -1,29 +0,0 @@ -// @flow - -// duplicated from transform-file so we do not have to import anything here -type TransformFile = { - (filename: string, callback: Function): void, - (filename: string, opts: ?Object, callback: Function): void, -}; - -export const transformFile: TransformFile = (function transformFile( - filename, - opts, - callback, -) { - if (typeof opts === "function") { - callback = opts; - } - - callback(new Error("Transforming files is not supported in browsers"), null); -}: Function); - -export function transformFileSync() { - throw new Error("Transforming files is not supported in browsers"); -} - -export function transformFileAsync() { - return Promise.reject( - new Error("Transforming files is not supported in browsers"), - ); -} diff --git a/node_modules/@babel/core/src/transform-file-browser.ts b/node_modules/@babel/core/src/transform-file-browser.ts new file mode 100644 index 00000000..f316cb43 --- /dev/null +++ b/node_modules/@babel/core/src/transform-file-browser.ts @@ -0,0 +1,31 @@ +// duplicated from transform-file so we do not have to import anything here +type TransformFile = { + (filename: string, callback: (error: Error, file: null) => void): void; + ( + filename: string, + opts: any, + callback: (error: Error, file: null) => void, + ): void; +}; + +export const transformFile: TransformFile = function transformFile( + filename, + opts, + callback?: (error: Error, file: null) => void, +) { + if (typeof opts === "function") { + callback = opts; + } + + callback(new Error("Transforming files is not supported in browsers"), null); +}; + +export function transformFileSync(): never { + throw new Error("Transforming files is not supported in browsers"); +} + +export function transformFileAsync() { + return Promise.reject( + new Error("Transforming files is not supported in browsers"), + ); +} diff --git a/node_modules/@babel/core/src/transform-file.js b/node_modules/@babel/core/src/transform-file.js deleted file mode 100644 index 480afc1c..00000000 --- a/node_modules/@babel/core/src/transform-file.js +++ /dev/null @@ -1,40 +0,0 @@ -// @flow - -import gensync from "gensync"; - -import loadConfig, { type InputOptions, type ResolvedConfig } from "./config"; -import { - run, - type FileResult, - type FileResultCallback, -} from "./transformation"; -import * as fs from "./gensync-utils/fs"; - -import typeof * as transformFileBrowserType from "./transform-file-browser"; -import typeof * as transformFileType from "./transform-file"; - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of transform-file-browser, since this file may be replaced at bundle time with -// transform-file-browser. -((({}: any): $Exact): $Exact); - -type TransformFile = { - (filename: string, callback: FileResultCallback): void, - (filename: string, opts: ?InputOptions, callback: FileResultCallback): void, -}; - -const transformFileRunner = gensync<[string, ?InputOptions], FileResult | null>( - function* (filename, opts) { - const options = { ...opts, filename }; - - const config: ResolvedConfig | null = yield* loadConfig(options); - if (config === null) return null; - - const code = yield* fs.readFile(filename, "utf8"); - return yield* run(config, code); - }, -); - -export const transformFile: TransformFile = transformFileRunner.errback; -export const transformFileSync = transformFileRunner.sync; -export const transformFileAsync = transformFileRunner.async; diff --git a/node_modules/@babel/core/src/transform-file.ts b/node_modules/@babel/core/src/transform-file.ts new file mode 100644 index 00000000..444c1088 --- /dev/null +++ b/node_modules/@babel/core/src/transform-file.ts @@ -0,0 +1,55 @@ +import gensync, { type Handler } from "gensync"; + +import loadConfig from "./config"; +import type { InputOptions, ResolvedConfig } from "./config"; +import { run } from "./transformation"; +import type { FileResult, FileResultCallback } from "./transformation"; +import * as fs from "./gensync-utils/fs"; + +type transformFileBrowserType = typeof import("./transform-file-browser"); +type transformFileType = typeof import("./transform-file"); + +// Kind of gross, but essentially asserting that the exports of this module are the same as the +// exports of transform-file-browser, since this file may be replaced at bundle time with +// transform-file-browser. +({}) as any as transformFileBrowserType as transformFileType; + +const transformFileRunner = gensync(function* ( + filename: string, + opts?: InputOptions, +): Handler { + const options = { ...opts, filename }; + + const config: ResolvedConfig | null = yield* loadConfig(options); + if (config === null) return null; + + const code = yield* fs.readFile(filename, "utf8"); + return yield* run(config, code); +}); + +// @ts-expect-error TS doesn't detect that this signature is compatible +export function transformFile( + filename: string, + callback: FileResultCallback, +): void; +export function transformFile( + filename: string, + opts: InputOptions | undefined | null, + callback: FileResultCallback, +): void; +export function transformFile( + ...args: Parameters +) { + transformFileRunner.errback(...args); +} + +export function transformFileSync( + ...args: Parameters +) { + return transformFileRunner.sync(...args); +} +export function transformFileAsync( + ...args: Parameters +) { + return transformFileRunner.async(...args); +} diff --git a/node_modules/@babel/core/src/transformation/util/clone-deep-browser.js b/node_modules/@babel/core/src/transformation/util/clone-deep-browser.js deleted file mode 100644 index 78ae53eb..00000000 --- a/node_modules/@babel/core/src/transformation/util/clone-deep-browser.js +++ /dev/null @@ -1,19 +0,0 @@ -const serialized = "$$ babel internal serialized type" + Math.random(); - -function serialize(key, value) { - if (typeof value !== "bigint") return value; - return { - [serialized]: "BigInt", - value: value.toString(), - }; -} - -function revive(key, value) { - if (!value || typeof value !== "object") return value; - if (value[serialized] !== "BigInt") return value; - return BigInt(value.value); -} - -export default function (value) { - return JSON.parse(JSON.stringify(value, serialize), revive); -} diff --git a/node_modules/@babel/core/src/transformation/util/clone-deep.js b/node_modules/@babel/core/src/transformation/util/clone-deep.js deleted file mode 100644 index cc077ce9..00000000 --- a/node_modules/@babel/core/src/transformation/util/clone-deep.js +++ /dev/null @@ -1,9 +0,0 @@ -import v8 from "v8"; -import cloneDeep from "./clone-deep-browser"; - -export default function (value) { - if (v8.deserialize && v8.serialize) { - return v8.deserialize(v8.serialize(value)); - } - return cloneDeep(value); -} diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js index b0d792e8..def55524 100644 --- a/node_modules/@babel/generator/lib/buffer.js +++ b/node_modules/@babel/generator/lib/buffer.js @@ -4,256 +4,304 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -const SPACES_RE = /^[ \t]+$/; - class Buffer { constructor(map) { this._map = null; - this._buf = []; - this._last = ""; + this._buf = ""; + this._str = ""; + this._appendCount = 0; + this._last = 0; this._queue = []; + this._queueCursor = 0; + this._canMarkIdName = true; this._position = { line: 1, column: 0 }; this._sourcePosition = { - identifierName: null, - line: null, - column: null, - filename: null + identifierName: undefined, + identifierNamePos: undefined, + line: undefined, + column: undefined, + filename: undefined }; - this._disallowedPop = null; this._map = map; + this._allocQueue(); + } + _allocQueue() { + const queue = this._queue; + for (let i = 0; i < 16; i++) { + queue.push({ + char: 0, + repeat: 1, + line: undefined, + column: undefined, + identifierName: undefined, + identifierNamePos: undefined, + filename: "" + }); + } + } + _pushQueue(char, repeat, line, column, filename) { + const cursor = this._queueCursor; + if (cursor === this._queue.length) { + this._allocQueue(); + } + const item = this._queue[cursor]; + item.char = char; + item.repeat = repeat; + item.line = line; + item.column = column; + item.filename = filename; + this._queueCursor++; + } + _popQueue() { + if (this._queueCursor === 0) { + throw new Error("Cannot pop from empty queue"); + } + return this._queue[--this._queueCursor]; } - get() { this._flush(); - const map = this._map; const result = { - code: this._buf.join("").trimRight(), - map: null, - rawMappings: map == null ? void 0 : map.getRawMappings() + code: (this._buf + this._str).trimRight(), + decodedMap: map == null ? void 0 : map.getDecoded(), + get __mergedMap() { + return this.map; + }, + get map() { + const resultMap = map ? map.get() : null; + result.map = resultMap; + return resultMap; + }, + set map(value) { + Object.defineProperty(result, "map", { + value, + writable: true + }); + }, + get rawMappings() { + const mappings = map == null ? void 0 : map.getRawMappings(); + result.rawMappings = mappings; + return mappings; + }, + set rawMappings(value) { + Object.defineProperty(result, "rawMappings", { + value, + writable: true + }); + } }; - - 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) { + append(str, maybeNewline) { this._flush(); - - const { - line, - column, - filename, - identifierName, - force - } = this._sourcePosition; - - this._append(str, line, column, identifierName, filename, force); + this._append(str, this._sourcePosition, maybeNewline); } - - queue(str) { - if (str === "\n") { - while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { - this._queue.shift(); + appendChar(char) { + this._flush(); + this._appendChar(char, 1, this._sourcePosition); + } + queue(char) { + if (char === 10) { + while (this._queueCursor !== 0) { + const char = this._queue[this._queueCursor - 1].char; + if (char !== 32 && char !== 9) { + break; + } + this._queueCursor--; } } - - const { - line, - column, - filename, - identifierName, - force - } = this._sourcePosition; - - this._queue.unshift([str, line, column, identifierName, filename, force]); + const sourcePosition = this._sourcePosition; + this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename); + } + queueIndentation(char, repeat) { + this._pushQueue(char, repeat, undefined, undefined, undefined); } - _flush() { - let item; - - while (item = this._queue.pop()) { - this._append(...item); + const queueCursor = this._queueCursor; + const queue = this._queue; + for (let i = 0; i < queueCursor; i++) { + const item = queue[i]; + this._appendChar(item.char, item.repeat, item); } + this._queueCursor = 0; } - - _append(str, line, column, identifierName, filename, force) { - this._buf.push(str); - - this._last = str[str.length - 1]; + _appendChar(char, repeat, sourcePos) { + this._last = char; + this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char); + if (char !== 10) { + this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename); + this._position.column += repeat; + } else { + this._position.line++; + this._position.column = 0; + } + if (this._canMarkIdName) { + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } + } + _append(str, sourcePos, maybeNewline) { + const len = str.length; + const position = this._position; + this._last = str.charCodeAt(len - 1); + if (++this._appendCount > 4096) { + +this._str; + this._buf += this._str; + this._str = str; + this._appendCount = 0; + } else { + this._str += str; + } + if (!maybeNewline && !this._map) { + position.column += len; + return; + } + const { + column, + identifierName, + identifierNamePos, + filename + } = sourcePos; + let line = sourcePos.line; + if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) { + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } let i = str.indexOf("\n"); let last = 0; - if (i !== 0) { - this._mark(line, column, identifierName, filename, force); + this._mark(line, column, identifierName, identifierNamePos, filename); } - while (i !== -1) { - this._position.line++; - this._position.column = 0; + position.line++; + position.column = 0; last = i + 1; - - if (last < str.length) { - this._mark(++line, 0, identifierName, filename, force); + if (last < len && line !== undefined) { + this._mark(++line, 0, null, null, filename); } - i = str.indexOf("\n", last); } - - this._position.column += str.length - last; + position.column += len - last; } - - _mark(line, column, identifierName, filename, force) { + _mark(line, column, identifierName, identifierNamePos, filename) { var _this$_map; - - (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force); + (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename); } - removeTrailingNewline() { - if (this._queue.length > 0 && this._queue[0][0] === "\n") { - this._queue.shift(); + const queueCursor = this._queueCursor; + if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 10) { + this._queueCursor--; } } - removeLastSemicolon() { - if (this._queue.length > 0 && this._queue[0][0] === ";") { - this._queue.shift(); + const queueCursor = this._queueCursor; + if (queueCursor !== 0 && this._queue[queueCursor - 1].char === 59) { + this._queueCursor--; } } - - 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; + getLastChar() { + const queueCursor = this._queueCursor; + return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last; + } + getNewlineCount() { + const queueCursor = this._queueCursor; + let count = 0; + if (queueCursor === 0) return this._last === 10 ? 1 : 0; + for (let i = queueCursor - 1; i >= 0; i--) { + if (this._queue[i].char !== 10) { + break; } - - return last === suffix; + count++; } - - const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, ""); - - if (suffix.length <= end.length) { - return end.slice(-suffix.length) === suffix; + return count === queueCursor && this._last === 10 ? count + 1 : count; + } + endsWithCharAndNewline() { + const queue = this._queue; + const queueCursor = this._queueCursor; + if (queueCursor !== 0) { + const lastCp = queue[queueCursor - 1].char; + if (lastCp !== 10) return; + if (queueCursor > 1) { + return queue[queueCursor - 2].char; + } else { + return this._last; + } } - - return false; } - hasContent() { - return this._queue.length > 0 || !!this._last; + return this._queueCursor !== 0 || !!this._last; } - exactSource(loc, cb) { - this.source("start", loc, true); + if (!this._map) { + cb(); + return; + } + this.source("start", loc); + const identifierName = loc.identifierName; + const sourcePos = this._sourcePosition; + if (identifierName) { + this._canMarkIdName = false; + sourcePos.identifierName = identifierName; + } cb(); + if (identifierName) { + this._canMarkIdName = true; + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } this.source("end", loc); - - this._disallowPop("start", loc); } - - source(prop, loc, force) { - if (prop && !loc) return; - - this._normalizePosition(prop, loc, this._sourcePosition, force); + source(prop, loc) { + if (!this._map) return; + this._normalizePosition(prop, loc, 0, 0); + } + sourceWithOffset(prop, loc, lineOffset, columnOffset) { + if (!this._map) return; + this._normalizePosition(prop, loc, lineOffset, columnOffset); } - 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; + if (this._map) { + this.source(prop, loc); } + cb(); } - - _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 == null ? void 0 : loc.identifierName) || null; - targetObj.line = pos == null ? void 0 : pos.line; - targetObj.column = pos == null ? void 0 : pos.column; - targetObj.filename = loc == null ? void 0 : loc.filename; - - if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) { - targetObj.force = force; + _normalizePosition(prop, loc, lineOffset, columnOffset) { + const pos = loc[prop]; + const target = this._sourcePosition; + if (pos) { + target.line = pos.line + lineOffset; + target.column = pos.column + columnOffset; + target.filename = loc.filename; } - - 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; + const queue = this._queue; + const queueCursor = this._queueCursor; + let lastIndex = -1; + let len = 0; + for (let i = 0; i < queueCursor; i++) { + const item = queue[i]; + if (item.char === 10) { + lastIndex = len; + } + len += item.repeat; + } + return lastIndex === -1 ? this._position.column + len : len - 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++; + const queue = this._queue; + for (let i = 0; i < this._queueCursor; i++) { + if (queue[i].char === 10) { + count++; + } } - return this._position.line + count; } - } +exports.default = Buffer; -exports.default = Buffer; \ No newline at end of file +//# sourceMappingURL=buffer.js.map diff --git a/node_modules/@babel/generator/lib/buffer.js.map b/node_modules/@babel/generator/lib/buffer.js.map new file mode 100644 index 00000000..18a75811 --- /dev/null +++ b/node_modules/@babel/generator/lib/buffer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["Buffer","constructor","map","_map","_buf","_str","_appendCount","_last","_queue","_queueCursor","_canMarkIdName","_position","line","column","_sourcePosition","identifierName","undefined","identifierNamePos","filename","_allocQueue","queue","i","push","char","repeat","_pushQueue","cursor","length","item","_popQueue","Error","get","_flush","result","code","trimRight","decodedMap","getDecoded","__mergedMap","resultMap","value","Object","defineProperty","writable","rawMappings","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","_appendChar","sourcePosition","queueIndentation","queueCursor","sourcePos","String","fromCharCode","_mark","len","position","charCodeAt","indexOf","last","_this$_map","mark","removeTrailingNewline","removeLastSemicolon","getLastChar","getNewlineCount","count","endsWithCharAndNewline","lastCp","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","lineOffset","columnOffset","withSource","pos","target","getCurrentColumn","lastIndex","getCurrentLine","exports","default"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map\";\nimport * as charcodes from \"charcodes\";\n\nexport type Pos = {\n line: number;\n column: number;\n};\nexport type Loc = {\n start?: Pos;\n end?: Pos;\n filename?: string;\n};\ntype SourcePos = {\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n filename: string | undefined;\n};\ntype InternalSourcePos = SourcePos & { identifierNamePos: Pos };\n\ntype QueueItem = {\n char: number;\n repeat: number;\n line: number | undefined;\n column: number | undefined;\n identifierName: undefined; // Not used, it always undefined.\n identifierNamePos: undefined; // Not used, it always undefined.\n filename: string | undefined;\n};\n\nexport default class Buffer {\n constructor(map?: SourceMap | null) {\n this._map = map;\n\n this._allocQueue();\n }\n\n _map: SourceMap = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _queue: QueueItem[] = [];\n _queueCursor = 0;\n _canMarkIdName = true;\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: InternalSourcePos = {\n identifierName: undefined,\n identifierNamePos: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n _allocQueue() {\n const queue = this._queue;\n\n for (let i = 0; i < 16; i++) {\n queue.push({\n char: 0,\n repeat: 1,\n line: undefined,\n column: undefined,\n identifierName: undefined,\n identifierNamePos: undefined,\n filename: \"\",\n });\n }\n }\n\n _pushQueue(\n char: number,\n repeat: number,\n line: number | undefined,\n column: number | undefined,\n filename: string | undefined,\n ) {\n const cursor = this._queueCursor;\n if (cursor === this._queue.length) {\n this._allocQueue();\n }\n const item = this._queue[cursor];\n item.char = char;\n item.repeat = repeat;\n item.line = line;\n item.column = column;\n item.filename = filename;\n\n this._queueCursor++;\n }\n\n _popQueue(): QueueItem {\n if (this._queueCursor === 0) {\n throw new Error(\"Cannot pop from empty queue\");\n }\n return this._queue[--this._queueCursor];\n }\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n this._flush();\n\n const map = this._map;\n const result = {\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n code: (this._buf + this._str).trimRight(),\n // Decoded sourcemap is free to generate.\n decodedMap: map?.getDecoded(),\n // Used as a marker for backwards compatibility. We moved input map merging\n // into the generator. We cannot merge the input map a second time, so the\n // presence of this field tells us we've already done the work.\n get __mergedMap() {\n return this.map;\n },\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = map ? map.get() : null;\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappings() {\n const mappings = map?.getRawMappings();\n result.rawMappings = mappings;\n return mappings;\n },\n set rawMappings(value) {\n Object.defineProperty(result, \"rawMappings\", { value, writable: true });\n },\n };\n\n return result;\n }\n\n /**\n * Add a string to the buffer that cannot be reverted.\n */\n\n append(str: string, maybeNewline: boolean): void {\n this._flush();\n\n this._append(str, this._sourcePosition, maybeNewline);\n }\n\n appendChar(char: number): void {\n this._flush();\n this._appendChar(char, 1, this._sourcePosition);\n }\n\n /**\n * Add a string to the buffer than can be reverted.\n */\n queue(char: number): void {\n // Drop trailing spaces when a newline is inserted.\n if (char === charcodes.lineFeed) {\n while (this._queueCursor !== 0) {\n const char = this._queue[this._queueCursor - 1].char;\n if (char !== charcodes.space && char !== charcodes.tab) {\n break;\n }\n\n this._queueCursor--;\n }\n }\n\n const sourcePosition = this._sourcePosition;\n this._pushQueue(\n char,\n 1,\n sourcePosition.line,\n sourcePosition.column,\n sourcePosition.filename,\n );\n }\n\n /**\n * Same as queue, but this indentation will never have a sourcemap marker.\n */\n queueIndentation(char: number, repeat: number): void {\n this._pushQueue(char, repeat, undefined, undefined, undefined);\n }\n\n _flush(): void {\n const queueCursor = this._queueCursor;\n const queue = this._queue;\n for (let i = 0; i < queueCursor; i++) {\n const item: QueueItem = queue[i];\n this._appendChar(item.char, item.repeat, item);\n }\n this._queueCursor = 0;\n }\n\n _appendChar(\n char: number,\n repeat: number,\n sourcePos: InternalSourcePos,\n ): void {\n this._last = char;\n\n this._str +=\n repeat > 1\n ? String.fromCharCode(char).repeat(repeat)\n : String.fromCharCode(char);\n\n if (char !== charcodes.lineFeed) {\n this._mark(\n sourcePos.line,\n sourcePos.column,\n sourcePos.identifierName,\n sourcePos.identifierNamePos,\n sourcePos.filename,\n );\n this._position.column += repeat;\n } else {\n this._position.line++;\n this._position.column = 0;\n }\n\n if (this._canMarkIdName) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n }\n\n _append(\n str: string,\n sourcePos: InternalSourcePos,\n maybeNewline: boolean,\n ): void {\n const len = str.length;\n const position = this._position;\n\n this._last = str.charCodeAt(len - 1);\n\n if (++this._appendCount > 4096) {\n +this._str; // Unexplainable huge performance boost. Ref: https://github.com/davidmarkclements/flatstr License: MIT\n this._buf += this._str;\n this._str = str;\n this._appendCount = 0;\n } else {\n this._str += str;\n }\n\n if (!maybeNewline && !this._map) {\n position.column += len;\n return;\n }\n\n const { column, identifierName, identifierNamePos, filename } = sourcePos;\n let line = sourcePos.line;\n\n if (\n (identifierName != null || identifierNamePos != null) &&\n this._canMarkIdName\n ) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n\n // Search for newline chars. We search only for `\\n`, since both `\\r` and\n // `\\r\\n` are normalized to `\\n` during parse. We exclude `\\u2028` and\n // `\\u2029` for performance reasons, they're so uncommon that it's probably\n // ok. It's also unclear how other sourcemap utilities handle them...\n let i = str.indexOf(\"\\n\");\n let last = 0;\n\n // If the string starts with a newline char, then adding a mark is redundant.\n // This catches both \"no newlines\" and \"newline after several chars\".\n if (i !== 0) {\n this._mark(line, column, identifierName, identifierNamePos, filename);\n }\n\n // Now, find each remaining newline char in the string.\n while (i !== -1) {\n position.line++;\n position.column = 0;\n last = i + 1;\n\n // We mark the start of each line, which happens directly after this newline char\n // unless this is the last char.\n // When manually adding multi-line content (such as a comment), `line` will be `undefined`.\n if (last < len && line !== undefined) {\n this._mark(++line, 0, null, null, filename);\n }\n i = str.indexOf(\"\\n\", last);\n }\n position.column += len - last;\n }\n\n _mark(\n line: number | undefined,\n column: number | undefined,\n identifierName: string | undefined,\n identifierNamePos: Pos | undefined,\n filename: string | undefined,\n ): void {\n this._map?.mark(\n this._position,\n line,\n column,\n identifierName,\n identifierNamePos,\n filename,\n );\n }\n\n removeTrailingNewline(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.lineFeed\n ) {\n this._queueCursor--;\n }\n }\n\n removeLastSemicolon(): void {\n const queueCursor = this._queueCursor;\n if (\n queueCursor !== 0 &&\n this._queue[queueCursor - 1].char === charcodes.semicolon\n ) {\n this._queueCursor--;\n }\n }\n\n getLastChar(): number {\n const queueCursor = this._queueCursor;\n return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last;\n }\n\n /**\n * This will only detect at most 1 newline after a call to `flush()`,\n * but this has not been found so far, and an accurate count can be achieved if needed later.\n */\n getNewlineCount(): number {\n const queueCursor = this._queueCursor;\n let count = 0;\n if (queueCursor === 0) return this._last === charcodes.lineFeed ? 1 : 0;\n for (let i = queueCursor - 1; i >= 0; i--) {\n if (this._queue[i].char !== charcodes.lineFeed) {\n break;\n }\n count++;\n }\n return count === queueCursor && this._last === charcodes.lineFeed\n ? count + 1\n : count;\n }\n\n /**\n * check if current _last + queue ends with newline, return the character before newline\n *\n * @param {*} ch\n * @memberof Buffer\n */\n endsWithCharAndNewline(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n if (queueCursor !== 0) {\n // every element in queue is one-length whitespace string\n const lastCp = queue[queueCursor - 1].char;\n if (lastCp !== charcodes.lineFeed) return;\n if (queueCursor > 1) {\n return queue[queueCursor - 2].char;\n } else {\n return this._last;\n }\n }\n // We assume that everything being matched is at most a single token plus some whitespace,\n // which everything currently is, but otherwise we'd have to expand _last or check _buf.\n }\n\n hasContent(): boolean {\n return this._queueCursor !== 0 || !!this._last;\n }\n\n /**\n * Certain sourcemap usecases expect mappings to be more accurate than\n * Babel's generic sourcemap handling allows. For now, we special-case\n * identifiers to allow for the primary cases to work.\n * The goal of this line is to ensure that the map output from Babel will\n * have an exact range on identifiers in the output code. Without this\n * line, Babel would potentially include some number of trailing tokens\n * that are printed after the identifier, but before another location has\n * been assigned.\n * This allows tooling like Rollup and Webpack to more accurately perform\n * their own transformations. Most importantly, this allows the import/export\n * transformations performed by those tools to loose less information when\n * applying their own transformations on top of the code and map results\n * generated by Babel itself.\n *\n * The primary example of this is the snippet:\n *\n * import mod from \"mod\";\n * mod();\n *\n * With this line, there will be one mapping range over \"mod\" and another\n * over \"();\", where previously it would have been a single mapping.\n */\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!this._map) {\n cb();\n return;\n }\n\n this.source(\"start\", loc);\n // @ts-expect-error identifierName is not defined\n const identifierName = loc.identifierName;\n const sourcePos = this._sourcePosition;\n if (identifierName) {\n this._canMarkIdName = false;\n sourcePos.identifierName = identifierName;\n }\n cb();\n\n if (identifierName) {\n this._canMarkIdName = true;\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n this.source(\"end\", loc);\n }\n\n /**\n * Sets a given position as the current source location so generated code after this call\n * will be given this position in the sourcemap.\n */\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!this._map) return;\n\n // Since this is called extremely often, we re-use the same _sourcePosition\n // object for the whole lifetime of the buffer.\n this._normalizePosition(prop, loc, 0, 0);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n lineOffset: number,\n columnOffset: number,\n ): void {\n if (!this._map) return;\n\n this._normalizePosition(prop, loc, lineOffset, columnOffset);\n }\n\n /**\n * Call a callback with a specific source location\n */\n\n withSource(prop: \"start\" | \"end\", loc: Loc, cb: () => void): void {\n if (this._map) {\n this.source(prop, loc);\n }\n\n cb();\n }\n\n _normalizePosition(\n prop: \"start\" | \"end\",\n loc: Loc,\n lineOffset: number,\n columnOffset: number,\n ) {\n const pos = loc[prop];\n const target = this._sourcePosition;\n\n if (pos) {\n target.line = pos.line + lineOffset;\n target.column = pos.column + columnOffset;\n target.filename = loc.filename;\n }\n }\n\n getCurrentColumn(): number {\n const queue = this._queue;\n const queueCursor = this._queueCursor;\n\n let lastIndex = -1;\n let len = 0;\n for (let i = 0; i < queueCursor; i++) {\n const item = queue[i];\n if (item.char === charcodes.lineFeed) {\n lastIndex = len;\n }\n len += item.repeat;\n }\n\n return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex;\n }\n\n getCurrentLine(): number {\n let count = 0;\n\n const queue = this._queue;\n for (let i = 0; i < this._queueCursor; i++) {\n if (queue[i].char === charcodes.lineFeed) {\n count++;\n }\n }\n\n return this._position.line + count;\n }\n}\n"],"mappings":";;;;;;AA8Be,MAAMA,MAAM,CAAC;EAC1BC,WAAWA,CAACC,GAAsB,EAAE;IAAA,KAMpCC,IAAI,GAAc,IAAI;IAAA,KACtBC,IAAI,GAAG,EAAE;IAAA,KACTC,IAAI,GAAG,EAAE;IAAA,KACTC,YAAY,GAAG,CAAC;IAAA,KAChBC,KAAK,GAAG,CAAC;IAAA,KACTC,MAAM,GAAgB,EAAE;IAAA,KACxBC,YAAY,GAAG,CAAC;IAAA,KAChBC,cAAc,GAAG,IAAI;IAAA,KAErBC,SAAS,GAAG;MACVC,IAAI,EAAE,CAAC;MACPC,MAAM,EAAE;IACV,CAAC;IAAA,KACDC,eAAe,GAAsB;MACnCC,cAAc,EAAEC,SAAS;MACzBC,iBAAiB,EAAED,SAAS;MAC5BJ,IAAI,EAAEI,SAAS;MACfH,MAAM,EAAEG,SAAS;MACjBE,QAAQ,EAAEF;IACZ,CAAC;IAxBC,IAAI,CAACb,IAAI,GAAGD,GAAG;IAEf,IAAI,CAACiB,WAAW,CAAC,CAAC;EACpB;EAuBAA,WAAWA,CAAA,EAAG;IACZ,MAAMC,KAAK,GAAG,IAAI,CAACZ,MAAM;IAEzB,KAAK,IAAIa,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;MAC3BD,KAAK,CAACE,IAAI,CAAC;QACTC,IAAI,EAAE,CAAC;QACPC,MAAM,EAAE,CAAC;QACTZ,IAAI,EAAEI,SAAS;QACfH,MAAM,EAAEG,SAAS;QACjBD,cAAc,EAAEC,SAAS;QACzBC,iBAAiB,EAA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B;IAEA,OAAOgE,SAAS,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC7E,SAAS,CAACE,MAAM,GAAG+C,GAAG,GAAGA,GAAG,GAAG,CAAC,GAAG4B,SAAS;EAC7E;EAEAC,cAAcA,CAAA,EAAW;IACvB,IAAIlB,KAAK,GAAG,CAAC;IAEb,MAAMnD,KAAK,GAAG,IAAI,CAACZ,MAAM;IACzB,KAAK,IAAIa,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACZ,YAAY,EAAEY,CAAC,EAAE,EAAE;MAC1C,IAAID,KAAK,CAACC,CAAC,CAAC,CAACE,IAAI,OAAuB,EAAE;QACxCgD,KAAK,EAAE;MACT;IACF;IAEA,OAAO,IAAI,CAAC5D,SAAS,CAACC,IAAI,GAAG2D,KAAK;EACpC;AACF;AAACmB,OAAA,CAAAC,OAAA,GAAA3F,MAAA"} \ 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 index dd57737d..7dae635d 100644 --- a/node_modules/@babel/generator/lib/generators/base.js +++ b/node_modules/@babel/generator/lib/generators/base.js @@ -3,81 +3,71 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.File = File; -exports.Program = Program; exports.BlockStatement = BlockStatement; exports.Directive = Directive; exports.DirectiveLiteral = DirectiveLiteral; +exports.File = File; exports.InterpreterDirective = InterpreterDirective; exports.Placeholder = Placeholder; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.Program = Program; 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(); + var _node$directives; + this.noIndentInnerCommentsHere(); + this.printInnerComments(); + const directivesLen = (_node$directives = node.directives) == null ? void 0 : _node$directives.length; + if (directivesLen) { + var _node$directives$trai; + const newline = node.body.length ? 2 : 1; + this.printSequence(node.directives, node, { + trailingCommentsLineOffset: newline + }); + if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) { + this.newline(newline); + } + } this.printSequence(node.body, node); } - function BlockStatement(node) { - var _node$directives; - - this.token("{"); - this.printInnerComments(node); - const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length; - - if (node.body.length || hasDirectives) { - this.newline(); + var _node$directives2; + this.tokenChar(123); + const directivesLen = (_node$directives2 = node.directives) == null ? void 0 : _node$directives2.length; + if (directivesLen) { + var _node$directives$trai2; + const newline = node.body.length ? 2 : 1; this.printSequence(node.directives, node, { - indent: true + indent: true, + trailingCommentsLineOffset: newline }); - 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("}"); + if (!((_node$directives$trai2 = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) { + this.newline(newline); + } } + this.printSequence(node.body, node, { + indent: true + }); + this.rightBrace(node); } - 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) { + if (!this.format.minified && raw !== undefined) { this.token(raw); return; } - const { value } = node; - if (!unescapedDoubleQuoteRE.test(value)) { this.token(`"${value}"`); } else if (!unescapedSingleQuoteRE.test(value)) { @@ -86,17 +76,17 @@ function DirectiveLiteral(node) { 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`); + this.token(`#!${node.value}`); + this.newline(1, true); } - function Placeholder(node) { this.token("%%"); this.print(node.name); this.token("%%"); - if (node.expectedNode === "Statement") { this.semicolon(); } -} \ No newline at end of file +} + +//# sourceMappingURL=base.js.map diff --git a/node_modules/@babel/generator/lib/generators/base.js.map b/node_modules/@babel/generator/lib/generators/base.js.map new file mode 100644 index 00000000..252e5117 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/base.js.map @@ -0,0 +1 @@ +{"version":3,"names":["File","node","program","print","interpreter","Program","_node$directives","noIndentInnerCommentsHere","printInnerComments","directivesLen","directives","length","_node$directives$trai","newline","body","printSequence","trailingCommentsLineOffset","trailingComments","BlockStatement","_node$directives2","token","_node$directives$trai2","indent","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","undefined","test","Error","InterpreterDirective","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter, node);\n }\n\n this.print(node.program, node);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.noIndentInnerCommentsHere();\n this.printInnerComments();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, node, {\n indent: true,\n trailingCommentsLineOffset: newline,\n });\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, node, { indent: true });\n\n this.rightBrace(node);\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value, node);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this.newline(1, true);\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\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sBAAsB,CAACQ,IAAI,CAACV,KAAK,CAAC,EAAE;IAC9C,IAAI,CAACL,KAAK,CAAE,IAAGK,KAAM,GAAE,CAAC;EAC1B,CAAC,MAAM;IACL,MAAM,IAAIW,KAAK,CACb,mEAAmE,GACjE,2CACJ,CAAC;EACH;AACF;AAEO,SAASC,oBAAoBA,CAElCpC,IAA4B,EAC5B;EACA,IAAI,CAACmB,KAAK,CAAE,KAAInB,IAAI,CAACwB,KAAM,EAAC,CAAC;EAC7B,IAAI,CAACZ,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC;AACvB;AAEO,SAASyB,WAAWA,CAAgBrC,IAAmB,EAAE;EAC9D,IAAI,CAACmB,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACjB,KAAK,CAACF,IAAI,CAACsC,IAAI,CAAC;EACrB,IAAI,CAACnB,KAAK,CAAC,IAAI,CAAC;EAEhB,IAAInB,IAAI,CAACuC,YAAY,KAAK,WAAW,EAAE;IACrC,IAAI,CAACd,SAAS,CAAC,CAAC;EAClB;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/generator/lib/generators/classes.js index 8d8f9393..e3dc0e81 100644 --- a/node_modules/@babel/generator/lib/generators/classes.js +++ b/node_modules/@babel/generator/lib/generators/classes.js @@ -3,45 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; +exports.ClassAccessorProperty = ClassAccessorProperty; exports.ClassBody = ClassBody; -exports.ClassProperty = ClassProperty; -exports.ClassPrivateProperty = ClassPrivateProperty; +exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; exports.ClassMethod = ClassMethod; exports.ClassPrivateMethod = ClassPrivateMethod; -exports._classMethodHead = _classMethodHead; +exports.ClassPrivateProperty = ClassPrivateProperty; +exports.ClassProperty = ClassProperty; exports.StaticBlock = StaticBlock; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports._classMethodHead = _classMethodHead; +var _t = require("@babel/types"); +const { + isExportDefaultDeclaration, + isExportNamedDeclaration +} = _t; function ClassDeclaration(node, parent) { - if (!this.format.decoratorsBeforeExport || !t.isExportDefaultDeclaration(parent) && !t.isExportNamedDeclaration(parent)) { + const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent); + if (!inExport || !this._shouldPrintDecoratorsBeforeExport(parent)) { this.printJoin(node.decorators, node); } - if (node.declare) { this.word("declare"); this.space(); } - if (node.abstract) { this.word("abstract"); this.space(); } - this.word("class"); - if (node.id) { this.space(); this.print(node.id, node); } - this.print(node.typeParameters, node); - if (node.superClass) { this.space(); this.word("extends"); @@ -49,124 +43,135 @@ function ClassDeclaration(node, parent) { this.print(node.superClass, node); this.print(node.superTypeParameters, node); } - if (node.implements) { this.space(); this.word("implements"); this.space(); this.printList(node.implements, node); } - this.space(); this.print(node.body, node); } - function ClassBody(node) { - this.token("{"); - this.printInnerComments(node); - + this.tokenChar(123); if (node.body.length === 0) { - this.token("}"); + this.tokenChar(125); } else { this.newline(); - this.indent(); - this.printSequence(node.body, node); - this.dedent(); - if (!this.endsWith("\n")) this.newline(); - this.rightBrace(); + this.printSequence(node.body, node, { + indent: true + }); + if (!this.endsWith(10)) this.newline(); + this.rightBrace(node); } } - function ClassProperty(node) { + var _node$key$loc, _node$key$loc$end; this.printJoin(node.decorators, node); - this.source("end", node.key.loc); - this.tsPrintClassMemberModifiers(node, true); - + const endLine = (_node$key$loc = node.key.loc) == null ? void 0 : (_node$key$loc$end = _node$key$loc.end) == null ? void 0 : _node$key$loc$end.line; + if (endLine) this.catchUp(endLine); + this.tsPrintClassMemberModifiers(node); if (node.computed) { - this.token("["); + this.tokenChar(91); this.print(node.key, node); - this.token("]"); + this.tokenChar(93); } else { this._variance(node); - this.print(node.key, node); } - if (node.optional) { - this.token("?"); + this.tokenChar(63); } - if (node.definite) { - this.token("!"); + this.tokenChar(33); } - this.print(node.typeAnnotation, node); - if (node.value) { this.space(); - this.token("="); + this.tokenChar(61); + this.space(); + this.print(node.value, node); + } + this.semicolon(); +} +function ClassAccessorProperty(node) { + var _node$key$loc2, _node$key$loc2$end; + this.printJoin(node.decorators, node); + const endLine = (_node$key$loc2 = node.key.loc) == null ? void 0 : (_node$key$loc2$end = _node$key$loc2.end) == null ? void 0 : _node$key$loc2$end.line; + if (endLine) this.catchUp(endLine); + this.tsPrintClassMemberModifiers(node); + this.word("accessor", true); + this.space(); + if (node.computed) { + this.tokenChar(91); + this.print(node.key, node); + this.tokenChar(93); + } else { + this._variance(node); + this.print(node.key, node); + } + if (node.optional) { + this.tokenChar(63); + } + if (node.definite) { + this.tokenChar(33); + } + this.print(node.typeAnnotation, node); + if (node.value) { + this.space(); + this.tokenChar(61); this.space(); this.print(node.value, node); } - this.semicolon(); } - function ClassPrivateProperty(node) { this.printJoin(node.decorators, node); - if (node.static) { this.word("static"); this.space(); } - this.print(node.key, node); this.print(node.typeAnnotation, node); - if (node.value) { this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(node.value, node); } - this.semicolon(); } - function ClassMethod(node) { this._classMethodHead(node); - this.space(); this.print(node.body, node); } - function ClassPrivateMethod(node) { this._classMethodHead(node); - this.space(); this.print(node.body, node); } - function _classMethodHead(node) { + var _node$key$loc3, _node$key$loc3$end; this.printJoin(node.decorators, node); - this.source("end", node.key.loc); - this.tsPrintClassMemberModifiers(node, false); - + const endLine = (_node$key$loc3 = node.key.loc) == null ? void 0 : (_node$key$loc3$end = _node$key$loc3.end) == null ? void 0 : _node$key$loc3$end.line; + if (endLine) this.catchUp(endLine); + this.tsPrintClassMemberModifiers(node); this._methodHead(node); } - function StaticBlock(node) { this.word("static"); this.space(); - this.token("{"); - + this.tokenChar(123); if (node.body.length === 0) { - this.token("}"); + this.tokenChar(125); } else { this.newline(); this.printSequence(node.body, node, { indent: true }); - this.rightBrace(); + this.rightBrace(node); } -} \ No newline at end of file +} + +//# sourceMappingURL=classes.js.map diff --git a/node_modules/@babel/generator/lib/generators/classes.js.map b/node_modules/@babel/generator/lib/generators/classes.js.map new file mode 100644 index 00000000..64411ed0 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/classes.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","isExportDefaultDeclaration","isExportNamedDeclaration","ClassDeclaration","node","parent","inExport","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","declare","word","space","abstract","id","print","typeParameters","superClass","superTypeParameters","implements","printList","body","ClassBody","token","length","newline","printSequence","indent","endsWith","rightBrace","ClassProperty","_node$key$loc","_node$key$loc$end","endLine","key","loc","end","line","catchUp","tsPrintClassMemberModifiers","computed","_variance","optional","definite","typeAnnotation","value","semicolon","ClassAccessorProperty","_node$key$loc2","_node$key$loc2$end","ClassPrivateProperty","static","ClassMethod","_classMethodHead","ClassPrivateMethod","_node$key$loc3","_node$key$loc3$end","_methodHead","StaticBlock"],"sources":["../../src/generators/classes.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isExportDefaultDeclaration,\n isExportNamedDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function ClassDeclaration(\n this: Printer,\n node: t.ClassDeclaration,\n parent: t.Node,\n) {\n const inExport =\n isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);\n\n if (\n !inExport ||\n !this._shouldPrintDecoratorsBeforeExport(\n parent as t.ExportDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n this.printJoin(node.decorators, node);\n }\n\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n if (node.abstract) {\n // TS\n this.word(\"abstract\");\n this.space();\n }\n\n this.word(\"class\");\n\n if (node.id) {\n this.space();\n this.print(node.id, node);\n }\n\n this.print(node.typeParameters, node);\n\n if (node.superClass) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.superClass, node);\n this.print(node.superTypeParameters, node);\n }\n\n if (node.implements) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n\n this.space();\n this.print(node.body, node);\n}\n\nexport { ClassDeclaration as ClassExpression };\n\nexport function ClassBody(this: Printer, node: t.ClassBody) {\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n\n this.printSequence(node.body, node, { indent: true });\n\n if (!this.endsWith(charCodes.lineFeed)) this.newline();\n\n this.rightBrace(node);\n }\n}\n\nexport function ClassProperty(this: Printer, node: t.ClassProperty) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassAccessorProperty(\n this: Printer,\n node: t.ClassAccessorProperty,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n // TS does not support class accessor property yet\n this.tsPrintClassMemberModifiers(node);\n\n this.word(\"accessor\", true);\n this.space();\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // Todo: Flow does not support class accessor property yet.\n this._variance(node);\n this.print(node.key, node);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassPrivateProperty(\n this: Printer,\n node: t.ClassPrivateProperty,\n) {\n this.printJoin(node.decorators, node);\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.key, node);\n this.print(node.typeAnnotation, node);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value, node);\n }\n this.semicolon();\n}\n\nexport function ClassMethod(this: Printer, node: t.ClassMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) {\n this._classMethodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function _classMethodHead(\n this: Printer,\n node: t.ClassMethod | t.ClassPrivateMethod | t.TSDeclareMethod,\n) {\n this.printJoin(node.decorators, node);\n\n // catch up to method key, avoid line break\n // between member modifiers/method heads and the method key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n this.tsPrintClassMemberModifiers(node);\n this._methodHead(node);\n}\n\nexport function StaticBlock(this: Printer, node: t.StaticBlock) {\n this.word(\"static\");\n this.space();\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n this.printSequence(node.body, node, {\n indent: true,\n });\n this.rightBrace(node);\n }\n}\n"],"m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,CAACO,IAAI,CAAC,QAAQ,CAAC;EACnB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACW,SAAK,IAAI,CAAC;EACf,IAAInB,IAAI,CAACiB,IAAI,CAACG,MAAM,KAAK,CAAC,EAAE;IAC1B,IAAI,CAACD,SAAK,IAAI,CAAC;EACjB,CAAC,MAAM;IACL,IAAI,CAACE,OAAO,CAAC,CAAC;IACd,IAAI,CAACC,aAAa,CAACtB,IAAI,CAACiB,IAAI,EAAEjB,IAAI,EAAE;MAClCuB,MAAM,EAAE;IACV,CAAC,CAAC;IACF,IAAI,CAACE,UAAU,CAACzB,IAAI,CAAC;EACvB;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/generator/lib/generators/expressions.js index 300ee2f1..336e708b 100644 --- a/node_modules/@babel/generator/lib/generators/expressions.js +++ b/node_modules/@babel/generator/lib/generators/expressions.js @@ -3,307 +3,307 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnaryExpression = UnaryExpression; -exports.DoExpression = DoExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.UpdateExpression = UpdateExpression; +exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression; +exports.AssignmentPattern = AssignmentPattern; +exports.AwaitExpression = AwaitExpression; +exports.BindExpression = BindExpression; +exports.CallExpression = CallExpression; exports.ConditionalExpression = ConditionalExpression; -exports.NewExpression = NewExpression; -exports.SequenceExpression = SequenceExpression; -exports.ThisExpression = ThisExpression; -exports.Super = Super; exports.Decorator = Decorator; -exports.OptionalMemberExpression = OptionalMemberExpression; -exports.OptionalCallExpression = OptionalCallExpression; -exports.CallExpression = CallExpression; -exports.Import = Import; +exports.DoExpression = DoExpression; exports.EmptyStatement = EmptyStatement; exports.ExpressionStatement = ExpressionStatement; -exports.AssignmentPattern = AssignmentPattern; -exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression; -exports.BindExpression = BindExpression; +exports.Import = Import; exports.MemberExpression = MemberExpression; exports.MetaProperty = MetaProperty; +exports.ModuleExpression = ModuleExpression; +exports.NewExpression = NewExpression; +exports.OptionalCallExpression = OptionalCallExpression; +exports.OptionalMemberExpression = OptionalMemberExpression; +exports.ParenthesizedExpression = ParenthesizedExpression; exports.PrivateName = PrivateName; +exports.SequenceExpression = SequenceExpression; +exports.Super = Super; +exports.ThisExpression = ThisExpression; +exports.UnaryExpression = UnaryExpression; +exports.UpdateExpression = UpdateExpression; exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; -exports.ModuleExpression = ModuleExpression; -exports.AwaitExpression = exports.YieldExpression = void 0; - -var t = _interopRequireWildcard(require("@babel/types")); - -var n = _interopRequireWildcard(require("../node")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.YieldExpression = YieldExpression; +exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport; +var _t = require("@babel/types"); +var n = require("../node"); +const { + isCallExpression, + isLiteral, + isMemberExpression, + isNewExpression +} = _t; function UnaryExpression(node) { - if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { - this.word(node.operator); + const { + operator + } = node; + if (operator === "void" || operator === "delete" || operator === "typeof" || operator === "throw") { + this.word(operator); this.space(); } else { - this.token(node.operator); + this.token(operator); } - this.print(node.argument, node); } - function DoExpression(node) { + if (node.async) { + this.word("async", true); + this.space(); + } this.word("do"); this.space(); this.print(node.body, node); } - function ParenthesizedExpression(node) { - this.token("("); + this.tokenChar(40); this.print(node.expression, node); - this.token(")"); + this.rightParens(node); } - function UpdateExpression(node) { if (node.prefix) { this.token(node.operator); this.print(node.argument, node); } else { - this.startTerminatorless(true); - this.print(node.argument, node); - this.endTerminatorless(); + this.printTerminatorless(node.argument, node, true); this.token(node.operator); } } - function ConditionalExpression(node) { this.print(node.test, node); this.space(); - this.token("?"); + this.tokenChar(63); this.space(); this.print(node.consequent, node); this.space(); - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.alternate, node); } - function NewExpression(node, parent) { this.word("new"); this.space(); this.print(node.callee, node); - - if (this.format.minified && node.arguments.length === 0 && !node.optional && !t.isCallExpression(parent, { + if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, { callee: node - }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) { + }) && !isMemberExpression(parent) && !isNewExpression(parent)) { return; } - this.print(node.typeArguments, node); this.print(node.typeParameters, node); - if (node.optional) { this.token("?."); } - - this.token("("); + this.tokenChar(40); this.printList(node.arguments, node); - this.token(")"); + this.rightParens(node); } - function SequenceExpression(node) { this.printList(node.expressions, node); } - function ThisExpression() { this.word("this"); } - function Super() { this.word("super"); } - +function isDecoratorMemberExpression(node) { + switch (node.type) { + case "Identifier": + return true; + case "MemberExpression": + return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object); + default: + return false; + } +} +function shouldParenthesizeDecoratorExpression(node) { + if (node.type === "ParenthesizedExpression") { + return false; + } + return !isDecoratorMemberExpression(node.type === "CallExpression" ? node.callee : node); +} +function _shouldPrintDecoratorsBeforeExport(node) { + if (typeof this.format.decoratorsBeforeExport === "boolean") { + return this.format.decoratorsBeforeExport; + } + return typeof node.start === "number" && node.start === node.declaration.start; +} function Decorator(node) { - this.token("@"); - this.print(node.expression, node); + this.tokenChar(64); + const { + expression + } = node; + if (shouldParenthesizeDecoratorExpression(expression)) { + this.tokenChar(40); + this.print(expression, node); + this.tokenChar(41); + } else { + this.print(expression, node); + } this.newline(); } - function OptionalMemberExpression(node) { + let { + computed + } = node; + const { + optional, + property + } = node; this.print(node.object, node); - - if (!node.computed && t.isMemberExpression(node.property)) { + if (!computed && isMemberExpression(property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } - - let computed = node.computed; - - if (t.isLiteral(node.property) && typeof node.property.value === "number") { + if (isLiteral(property) && typeof property.value === "number") { computed = true; } - - if (node.optional) { + if (optional) { this.token("?."); } - if (computed) { - this.token("["); - this.print(node.property, node); - this.token("]"); + this.tokenChar(91); + this.print(property, node); + this.tokenChar(93); } else { - if (!node.optional) { - this.token("."); + if (!optional) { + this.tokenChar(46); } - - this.print(node.property, node); + this.print(property, node); } } - function OptionalCallExpression(node) { this.print(node.callee, node); - this.print(node.typeArguments, node); this.print(node.typeParameters, node); - if (node.optional) { this.token("?."); } - - this.token("("); + this.print(node.typeArguments, node); + this.tokenChar(40); this.printList(node.arguments, node); - this.token(")"); + this.rightParens(node); } - function CallExpression(node) { this.print(node.callee, node); this.print(node.typeArguments, node); this.print(node.typeParameters, node); - this.token("("); + this.tokenChar(40); this.printList(node.arguments, node); - this.token(")"); + this.rightParens(node); } - function Import() { this.word("import"); } - -function buildYieldAwait(keyword) { - return function (node) { - this.word(keyword); - - if (node.delegate) { - this.token("*"); - } - +function AwaitExpression(node) { + this.word("await"); + if (node.argument) { + this.space(); + this.printTerminatorless(node.argument, node, false); + } +} +function YieldExpression(node) { + this.word("yield", true); + if (node.delegate) { + this.tokenChar(42); if (node.argument) { this.space(); - const terminatorState = this.startTerminatorless(); this.print(node.argument, node); - this.endTerminatorless(terminatorState); } - }; + } else { + if (node.argument) { + this.space(); + this.printTerminatorless(node.argument, node, false); + } + } } - -const YieldExpression = buildYieldAwait("yield"); -exports.YieldExpression = YieldExpression; -const AwaitExpression = buildYieldAwait("await"); -exports.AwaitExpression = AwaitExpression; - function EmptyStatement() { this.semicolon(true); } - function ExpressionStatement(node) { this.print(node.expression, node); this.semicolon(); } - function AssignmentPattern(node) { this.print(node.left, node); - if (node.left.optional) this.token("?"); + if (node.left.optional) this.tokenChar(63); this.print(node.left.typeAnnotation, node); this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(node.right, node); } - function AssignmentExpression(node, parent) { const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); - if (parens) { - this.token("("); + this.tokenChar(40); } - this.print(node.left, node); this.space(); - if (node.operator === "in" || node.operator === "instanceof") { this.word(node.operator); } else { this.token(node.operator); } - this.space(); this.print(node.right, node); - if (parens) { - this.token(")"); + this.tokenChar(41); } } - function BindExpression(node) { this.print(node.object, node); this.token("::"); this.print(node.callee, node); } - function MemberExpression(node) { this.print(node.object, node); - - if (!node.computed && t.isMemberExpression(node.property)) { + if (!node.computed && isMemberExpression(node.property)) { throw new TypeError("Got a MemberExpression for MemberExpression property"); } - let computed = node.computed; - - if (t.isLiteral(node.property) && typeof node.property.value === "number") { + if (isLiteral(node.property) && typeof node.property.value === "number") { computed = true; } - if (computed) { - this.token("["); + this.tokenChar(91); this.print(node.property, node); - this.token("]"); + this.tokenChar(93); } else { - this.token("."); + this.tokenChar(46); this.print(node.property, node); } } - function MetaProperty(node) { this.print(node.meta, node); - this.token("."); + this.tokenChar(46); this.print(node.property, node); } - function PrivateName(node) { - this.token("#"); + this.tokenChar(35); this.print(node.id, node); } - function V8IntrinsicIdentifier(node) { - this.token("%"); + this.tokenChar(37); this.word(node.name); } - function ModuleExpression(node) { - this.word("module"); + this.word("module", true); this.space(); - this.token("{"); - - if (node.body.body.length === 0) { - this.token("}"); - } else { + this.tokenChar(123); + this.indent(); + const { + body + } = node; + if (body.body.length || body.directives.length) { this.newline(); - this.printSequence(node.body.body, node, { - indent: true - }); - this.rightBrace(); } -} \ No newline at end of file + this.print(body, node); + this.dedent(); + this.rightBrace(node); +} + +//# sourceMappingURL=expressions.js.map diff --git a/node_modules/@babel/generator/lib/generators/expressions.js.map b/node_modules/@babel/generator/lib/generators/expressions.js.map new file mode 100644 index 00000000..11533b56 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/expressions.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","n","isCallExpression","isLiteral","isMemberExpression","isNewExpression","UnaryExpression","node","operator","word","space","token","print","argument","DoExpression","async","body","ParenthesizedExpression","expression","rightParens","UpdateExpression","prefix","printTerminatorless","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","printList","SequenceExpression","expressions","ThisExpression","Super","isDecoratorMemberExpression","type","computed","property","object","shouldParenthesizeDecoratorExpression","_shouldPrintDecoratorsBeforeExport","decoratorsBeforeExport","start","declaration","Decorator","newline","OptionalMemberExpression","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","AssignmentPattern","left","typeAnnotation","right","AssignmentExpression","parens","inForStatementInitCounter","needsParens","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as n from \"../node\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n const { operator } = node;\n if (\n operator === \"void\" ||\n operator === \"delete\" ||\n operator === \"typeof\" ||\n // throwExpressions\n operator === \"throw\"\n ) {\n this.word(operator);\n this.space();\n } else {\n this.token(operator);\n }\n\n this.print(node.argument, node);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.rightParens(node);\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator);\n this.print(node.argument, node);\n } else {\n this.printTerminatorless(node.argument, node, true);\n this.token(node.operator);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test, node);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent, node);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate, node);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee, node);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n // TODO: This can never happen\n this.token(\"?.\");\n }\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.rightParens(node);\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions, node);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nfunction isDecoratorMemberExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\nfunction shouldParenthesizeDecoratorExpression(\n node: t.Expression | t.Super | t.V8IntrinsicIdentifier,\n) {\n if (node.type === \"ParenthesizedExpression\") {\n // We didn't check extra?.parenthesized here because we don't track decorators in needsParen\n return false;\n }\n return !isDecoratorMemberExpression(\n node.type === \"CallExpression\" ? node.callee : node,\n );\n}\n\nexport function _shouldPrintDecoratorsBeforeExport(\n this: Printer,\n node: t.ExportDeclaration & { declaration: t.ClassDeclaration },\n) {\n if (typeof this.format.decoratorsBeforeExport === \"boolean\") {\n return this.format.decoratorsBeforeExport;\n }\n return (\n typeof node.start === \"number\" && node.start === node.declaration.start\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n const { expression } = node;\n if (shouldParenthesizeDecoratorExpression(expression)) {\n this.token(\"(\");\n this.print(expression, node);\n this.token(\")\");\n } else {\n this.print(expression, node);\n }\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExpression,\n) {\n let { computed } = node;\n const { optional, property } = node;\n\n this.print(node.object, node);\n\n if (!computed && isMemberExpression(property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n // @ts-expect-error todo(flow->ts) maybe instead of typeof check specific literal types?\n if (isLiteral(property) && typeof property.value === \"number\") {\n computed = true;\n }\n if (optional) {\n this.token(\"?.\");\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(property, node);\n this.token(\"]\");\n } else {\n if (!optional) {\n this.token(\".\");\n }\n this.print(property, node);\n }\n}\n\nexport function OptionalCallExpression(\n this: Printer,\n node: t.OptionalCallExpression,\n) {\n this.print(node.callee, node);\n\n this.print(node.typeParameters, node); // TS\n\n if (node.optional) {\n this.token(\"?.\");\n }\n\n this.print(node.typeArguments, node); // Flow\n\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.rightParens(node);\n}\n\nexport function CallExpression(this: Printer, node: t.CallExpression) {\n this.print(node.callee, node);\n\n this.print(node.typeArguments, node); // Flow\n this.print(node.typeParameters, node); // TS\n this.token(\"(\");\n this.printList(node.arguments, node);\n this.rightParens(node);\n}\n\nexport function Import(this: Printer) {\n this.word(\"import\");\n}\n\nexport function AwaitExpression(this: Printer, node: t.AwaitExpression) {\n this.word(\"await\");\n\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n}\n\nexport function YieldExpression(this: Printer, node: t.YieldExpression) {\n this.word(\"yield\", true);\n\n if (node.delegate) {\n this.token(\"*\");\n if (node.argument) {\n this.space();\n // line terminators are allowed after yield*\n this.print(node.argument, node);\n }\n } else {\n if (node.argument) {\n this.space();\n this.printTerminatorless(node.argument, node, false);\n }\n }\n}\n\nexport function EmptyStatement(this: Printer) {\n this.semicolon(true /* force */);\n}\n\nexport function ExpressionStatement(\n this: Printer,\n node: t.ExpressionStatement,\n) {\n this.print(node.expression, node);\n this.semicolon();\n}\n\nexport function AssignmentPattern(this: Printer, node: t.AssignmentPattern) {\n this.print(node.left, node);\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n if (node.left.optional) this.token(\"?\");\n // @ts-expect-error todo(flow->ts) property present on some of the types in union but not all\n this.print(node.left.typeAnnotation, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n}\n\nexport function AssignmentExpression(\n this: Printer,\n node: t.AssignmentExpression,\n parent: t.Node,\n) {\n // Somewhere inside a for statement `init` node but doesn't usually\n // needs a paren except for `in` expressions: `for (a in b ? a : b;;)`\n const parens =\n this.inForStatementInitCounter &&\n node.operator === \"in\" &&\n !n.needsParens(node, parent);\n\n if (parens) {\n this.token(\"(\");\n }\n\n this.print(node.left, node);\n\n this.space();\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n this.word(node.operator);\n } else {\n this.token(node.operator);\n }\n this.space();\n\n this.print(node.right, node);\n\n if (parens) {\n this.token(\")\");\n }\n}\n\nexport function BindExpression(this: Printer, node: t.BindExpression) {\n this.print(node.object, node);\n this.token(\"::\");\n this.print(node.callee, node);\n}\n\nexport {\n AssignmentExpression as BinaryExpression,\n AssignmentExpression as LogicalExpression,\n};\n\nexport function MemberExpression(this: Printer, node: t.MemberExpression) {\n this.print(node.object, node);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe use specific literal types\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(node.property, node);\n this.token(\"]\");\n } else {\n this.token(\".\");\n this.print(node.property, node);\n }\n}\n\nexport function MetaProperty(this: Printer, node: t.MetaProperty) {\n this.print(node.meta, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function PrivateName(this: Printer, node: t.PrivateName) {\n this.token(\"#\");\n this.print(node.id, node);\n}\n\nexport function V8IntrinsicIdentifier(\n this: Printer,\n node: t.V8IntrinsicIdentifier,\n) {\n this.token(\"%\");\n this.word(node.name);\n}\n\nexport function ModuleExpression(this: Printer, node: t.ModuleExpression) {\n this.word(\"module\", true);\n this.space();\n this.token(\"{\");\n this.indent();\n const { body } = node;\n if (body.body.length || body.directives.length) {\n this.newline();\n }\n this.print(body, node);\n this.dedent();\n this.rightBrace(node);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAOA,IAAAC,CAAA,GAAAD,OAAA;AAA6B;EAN3BE,gBAAgB;EAChBC,SAAS;EACTC,kBAAkB;EAClBC;AAAe,IAAAN,EAAA;AAKV,SAASO,eAAeA,CAAgBC,IAAuB,EAAE;EACtE,MAAM;IAAEC;EAAS,CAAC,GAAGD,IAAI;EACzB,IACEC,QAAQ,KAAK,MAAM,IACnBA,QAAQ,KAAK,QAAQ,IACrBA,QAAQ,KAAK,QAAQ,IAErBA,QAAQ,KAAK,OAAO,EACpB;IACA,IAAI,CAACC,IAAI,CAACD,QAAQ,CAAC;IACnB,IAAI,CAACE,KAAK,CAAC,CAAC;EACd,CAAC,MAAM;IACL,IAAI,CAACC,KAAK,CAACH,QAAQ,CAAC;EACtB;EAEA,I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IAAI,CAACA,IAAI,CAACiB,MAAM,IAAIjB,IAAI,CAACoE,UAAU,CAACnD,MAAM,EAAE;IAC9C,IAAI,CAACoB,OAAO,CAAC,CAAC;EAChB;EACA,IAAI,CAACzC,KAAK,CAACI,IAAI,EAAET,IAAI,CAAC;EACtB,IAAI,CAAC8E,MAAM,CAAC,CAAC;EACb,IAAI,CAACC,UAAU,CAAC/E,IAAI,CAAC;AACvB"} \ 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 index 87eee36f..e1f95be3 100644 --- a/node_modules/@babel/generator/lib/generators/flow.js +++ b/node_modules/@babel/generator/lib/generators/flow.js @@ -5,159 +5,142 @@ Object.defineProperty(exports, "__esModule", { }); exports.AnyTypeAnnotation = AnyTypeAnnotation; exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; +exports.BooleanTypeAnnotation = BooleanTypeAnnotation; exports.DeclareClass = DeclareClass; +exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; +exports.DeclareExportDeclaration = DeclareExportDeclaration; 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.DeclareTypeAlias = DeclareTypeAlias; exports.DeclareVariable = DeclareVariable; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.EnumDeclaration = EnumDeclaration; +exports.DeclaredPredicate = DeclaredPredicate; +exports.EmptyTypeAnnotation = EmptyTypeAnnotation; exports.EnumBooleanBody = EnumBooleanBody; -exports.EnumNumberBody = EnumNumberBody; -exports.EnumStringBody = EnumStringBody; -exports.EnumSymbolBody = EnumSymbolBody; -exports.EnumDefaultedMember = EnumDefaultedMember; exports.EnumBooleanMember = EnumBooleanMember; +exports.EnumDeclaration = EnumDeclaration; +exports.EnumDefaultedMember = EnumDefaultedMember; +exports.EnumNumberBody = EnumNumberBody; exports.EnumNumberMember = EnumNumberMember; +exports.EnumStringBody = EnumStringBody; exports.EnumStringMember = EnumStringMember; +exports.EnumSymbolBody = EnumSymbolBody; exports.ExistsTypeAnnotation = ExistsTypeAnnotation; exports.FunctionTypeAnnotation = FunctionTypeAnnotation; exports.FunctionTypeParam = FunctionTypeParam; -exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; -exports._interfaceish = _interfaceish; -exports._variance = _variance; +exports.IndexedAccessType = IndexedAccessType; +exports.InferredPredicate = InferredPredicate; exports.InterfaceDeclaration = InterfaceDeclaration; +exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; +exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; exports.NullableTypeAnnotation = NullableTypeAnnotation; +Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { + enumerable: true, + get: function () { + return _types2.NumericLiteral; + } +}); 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.ObjectTypeInternalSlot = ObjectTypeInternalSlot; exports.ObjectTypeProperty = ObjectTypeProperty; exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; +exports.OpaqueType = OpaqueType; +exports.OptionalIndexedAccessType = OptionalIndexedAccessType; exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.SymbolTypeAnnotation = SymbolTypeAnnotation; -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; } }); - -var t = _interopRequireWildcard(require("@babel/types")); - +exports.StringTypeAnnotation = StringTypeAnnotation; +exports.SymbolTypeAnnotation = SymbolTypeAnnotation; +exports.ThisTypeAnnotation = ThisTypeAnnotation; +exports.TupleTypeAnnotation = TupleTypeAnnotation; +exports.TypeAlias = TypeAlias; +exports.TypeAnnotation = TypeAnnotation; +exports.TypeCastExpression = TypeCastExpression; +exports.TypeParameter = TypeParameter; +exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; +exports.TypeofTypeAnnotation = TypeofTypeAnnotation; +exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.Variance = Variance; +exports.VoidTypeAnnotation = VoidTypeAnnotation; +exports._interfaceish = _interfaceish; +exports._variance = _variance; +var _t = require("@babel/types"); var _modules = require("./modules"); - var _types2 = require("./types"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +const { + isDeclareExportDeclaration, + isStatement +} = _t; function AnyTypeAnnotation() { this.word("any"); } - function ArrayTypeAnnotation(node) { - this.print(node.elementType, node); - this.token("["); - this.token("]"); + this.print(node.elementType, node, true); + this.tokenChar(91); + this.tokenChar(93); } - 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)) { + if (!isDeclareExportDeclaration(parent)) { this.word("declare"); this.space(); } - this.word("class"); this.space(); - this._interfaceish(node); } - function DeclareFunction(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { + if (!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.tokenChar(37); this.word("checks"); } - function DeclaredPredicate(node) { - this.token("%"); + this.tokenChar(37); this.word("checks"); - this.token("("); + this.tokenChar(40); this.print(node.value, node); - this.token(")"); + this.tokenChar(41); } - function DeclareInterface(node) { this.word("declare"); this.space(); this.InterfaceDeclaration(node); } - function DeclareModule(node) { this.word("declare"); this.space(); @@ -167,65 +150,53 @@ function DeclareModule(node) { this.space(); this.print(node.body, node); } - function DeclareModuleExports(node) { this.word("declare"); this.space(); this.word("module"); - this.token("."); + this.tokenChar(46); 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)) { + if (!isDeclareExportDeclaration(parent)) { this.word("declare"); this.space(); } - this.OpaqueType(node); } - function DeclareVariable(node, parent) { - if (!t.isDeclareExportDeclaration(parent)) { + if (!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); + FlowExportDeclaration.call(this, node); } - -function DeclareExportAllDeclaration() { +function DeclareExportAllDeclaration(node) { this.word("declare"); this.space(); - - _modules.ExportAllDeclaration.apply(this, arguments); + _modules.ExportAllDeclaration.call(this, node); } - function EnumDeclaration(node) { const { id, @@ -236,7 +207,6 @@ function EnumDeclaration(node) { this.print(id, node); this.print(body, node); } - function enumExplicitType(context, name, hasExplicitType) { if (hasExplicitType) { context.space(); @@ -244,10 +214,8 @@ function enumExplicitType(context, name, hasExplicitType) { context.space(); context.word(name); } - context.space(); } - function enumBody(context, node) { const { members @@ -255,21 +223,17 @@ function enumBody(context, node) { context.token("{"); context.indent(); context.newline(); - for (const member of members) { context.print(member, node); context.newline(); } - if (node.hasUnknownMembers) { context.token("..."); context.newline(); } - context.dedent(); context.token("}"); } - function EnumBooleanBody(node) { const { explicitType @@ -277,7 +241,6 @@ function EnumBooleanBody(node) { enumExplicitType(this, "boolean", explicitType); enumBody(this, node); } - function EnumNumberBody(node) { const { explicitType @@ -285,7 +248,6 @@ function EnumNumberBody(node) { enumExplicitType(this, "number", explicitType); enumBody(this, node); } - function EnumStringBody(node) { const { explicitType @@ -293,20 +255,17 @@ function EnumStringBody(node) { enumExplicitType(this, "string", explicitType); enumBody(this, node); } - function EnumSymbolBody(node) { enumExplicitType(this, "symbol", true); enumBody(this, node); } - function EnumDefaultedMember(node) { const { id } = node; this.print(id, node); - this.token(","); + this.tokenChar(44); } - function enumInitializedMember(context, node) { const { id, @@ -319,261 +278,216 @@ function enumInitializedMember(context, node) { context.print(init, node); context.token(","); } - function EnumBooleanMember(node) { enumInitializedMember(this, node); } - function EnumNumberMember(node) { enumInitializedMember(this, node); } - function EnumStringMember(node) { enumInitializedMember(this, node); } - function FlowExportDeclaration(node) { if (node.declaration) { const declar = node.declaration; this.print(declar, node); - if (!t.isStatement(declar)) this.semicolon(); + if (!isStatement(declar)) this.semicolon(); } else { - this.token("{"); - + this.tokenChar(123); if (node.specifiers.length) { this.space(); this.printList(node.specifiers, node); this.space(); } - - this.token("}"); - + this.tokenChar(125); if (node.source) { this.space(); this.word("from"); this.space(); this.print(node.source, node); } - this.semicolon(); } } - function ExistsTypeAnnotation() { - this.token("*"); + this.tokenChar(42); } - function FunctionTypeAnnotation(node, parent) { this.print(node.typeParameters, node); - this.token("("); - + this.tokenChar(40); if (node.this) { this.word("this"); - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.this.typeAnnotation, node); - if (node.params.length || node.rest) { - this.token(","); + this.tokenChar(44); this.space(); } } - this.printList(node.params, node); - if (node.rest) { if (node.params.length) { - this.token(","); + this.tokenChar(44); 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(":"); + this.tokenChar(41); + const type = parent == null ? void 0 : parent.type; + if (type != null && (type === "ObjectTypeCallProperty" || type === "ObjectTypeInternalSlot" || type === "DeclareFunction" || type === "ObjectTypeProperty" && parent.method)) { + this.tokenChar(58); } 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.optional) this.tokenChar(63); if (node.name) { - this.token(":"); + this.tokenChar(58); this.space(); } - this.print(node.typeAnnotation, node); } - function InterfaceExtends(node) { this.print(node.id, node); - this.print(node.typeParameters, node); + this.print(node.typeParameters, node, true); } - function _interfaceish(node) { var _node$extends; - this.print(node.id, node); this.print(node.typeParameters, node); - if ((_node$extends = node.extends) != null && _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); + if (node.type === "DeclareClass") { + var _node$mixins, _node$implements; + if ((_node$mixins = node.mixins) != null && _node$mixins.length) { + this.space(); + this.word("mixins"); + this.space(); + this.printList(node.mixins, node); + } + if ((_node$implements = node.implements) != null && _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("-"); + var _node$variance; + const kind = (_node$variance = node.variance) == null ? void 0 : _node$variance.kind; + if (kind != null) { + if (kind === "plus") { + this.tokenChar(43); + } else if (kind === "minus") { + this.tokenChar(45); } } } - function InterfaceDeclaration(node) { this.word("interface"); this.space(); - this._interfaceish(node); } - function andSeparator() { this.space(); - this.token("&"); + this.tokenChar(38); this.space(); } - function InterfaceTypeAnnotation(node) { + var _node$extends2; this.word("interface"); - - if (node.extends && node.extends.length) { + if ((_node$extends2 = node.extends) != null && _node$extends2.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.tokenChar(63); 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.tokenChar(91); this.printList(node.types, node); - this.token("]"); + this.tokenChar(93); } - 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.tokenChar(61); this.space(); this.print(node.right, node); this.semicolon(); } - function TypeAnnotation(node) { - this.token(":"); + this.tokenChar(58); this.space(); - if (node.optional) this.token("?"); + if (node.optional) this.tokenChar(63); this.print(node.typeAnnotation, node); } - function TypeParameterInstantiation(node) { - this.token("<"); + this.tokenChar(60); this.printList(node.params, node, {}); - this.token(">"); + this.tokenChar(62); } - 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.tokenChar(61); this.space(); this.print(node.default, node); } } - function OpaqueType(node) { this.word("opaque"); this.space(); @@ -581,193 +495,174 @@ function OpaqueType(node) { this.space(); this.print(node.id, node); this.print(node.typeParameters, node); - if (node.supertype) { - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.supertype, node); } - if (node.impltype) { this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(node.impltype, node); } - this.semicolon(); } - function ObjectTypeAnnotation(node) { if (node.exact) { this.token("{|"); } else { - this.token("{"); + this.tokenChar(123); } - const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])]; - if (props.length) { + this.newline(); this.space(); this.printJoin(props, node, { addNewlines(leading) { if (leading && !props[0]) return 1; }, - indent: true, statement: true, iterator: () => { if (props.length !== 1 || node.inexact) { - this.token(","); + this.tokenChar(44); this.space(); } } }); this.space(); } - if (node.inexact) { this.indent(); this.token("..."); - if (props.length) { this.newline(); } - this.dedent(); } - if (node.exact) { this.token("|}"); } else { - this.token("}"); + this.tokenChar(125); } } - function ObjectTypeInternalSlot(node) { if (node.static) { this.word("static"); this.space(); } - - this.token("["); - this.token("["); + this.tokenChar(91); + this.tokenChar(91); this.print(node.id, node); - this.token("]"); - this.token("]"); - if (node.optional) this.token("?"); - + this.tokenChar(93); + this.tokenChar(93); + if (node.optional) this.tokenChar(63); if (!node.method) { - this.token(":"); + this.tokenChar(58); 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("["); - + this.tokenChar(91); if (node.id) { this.print(node.id, node); - this.token(":"); + this.tokenChar(58); this.space(); } - this.print(node.key, node); - this.token("]"); - this.token(":"); + this.tokenChar(93); + this.tokenChar(58); 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(); } - if (node.kind === "get" || node.kind === "set") { this.word(node.kind); this.space(); } - this._variance(node); - this.print(node.key, node); - if (node.optional) this.token("?"); - + if (node.optional) this.tokenChar(63); if (!node.method) { - this.token(":"); + this.tokenChar(58); 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.tokenChar(46); this.print(node.id, node); } - function SymbolTypeAnnotation() { this.word("symbol"); } - function orSeparator() { this.space(); - this.token("|"); + this.tokenChar(124); this.space(); } - function UnionTypeAnnotation(node) { this.printJoin(node.types, node, { separator: orSeparator }); } - function TypeCastExpression(node) { - this.token("("); + this.tokenChar(40); this.print(node.expression, node); this.print(node.typeAnnotation, node); - this.token(")"); + this.tokenChar(41); } - function Variance(node) { if (node.kind === "plus") { - this.token("+"); + this.tokenChar(43); } else { - this.token("-"); + this.tokenChar(45); } } - function VoidTypeAnnotation() { this.word("void"); -} \ No newline at end of file +} +function IndexedAccessType(node) { + this.print(node.objectType, node, true); + this.tokenChar(91); + this.print(node.indexType, node); + this.tokenChar(93); +} +function OptionalIndexedAccessType(node) { + this.print(node.objectType, node); + if (node.optional) { + this.token("?."); + } + this.tokenChar(91); + this.print(node.indexType, node); + this.tokenChar(93); +} + +//# sourceMappingURL=flow.js.map diff --git a/node_modules/@babel/generator/lib/generators/flow.js.map b/node_modules/@babel/generator/lib/generators/flow.js.map new file mode 100644 index 00000000..4e8f1ed3 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/flow.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","_modules","_types2","isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","call","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","_node$extends","extends","_node$mixins","_node$implements","mixins","implements","_variance","_node$variance","kind","variance","andSeparator","InterfaceTypeAnnotation","_node$extends2","IntersectionTypeAnnotation","printJoin","types","separator","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","addNewlines","leading","statement","iterator","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, node, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n this._interfaceish(node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id, node);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation, node);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate, node);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value, node);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n this.InterfaceDeclaration(node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id, node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n this.TypeAlias(node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.OpaqueType(node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id, node);\n this.print(node.id.typeAnnotation, node);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.print(body, node);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member, node);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id, node);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n const { id, init } = node;\n context.print(id, node);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(init, node);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers.length) {\n this.space();\n this.printList(node.specifiers, node);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source, node);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent?: t.Node,\n) {\n this.print(node.typeParameters, node);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation, node);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params, node);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest, node);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n\n const type = parent?.type;\n if (\n type != null &&\n (type === \"ObjectTypeCallProperty\" ||\n type === \"ObjectTypeInternalSlot\" ||\n type === \"DeclareFunction\" ||\n (type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType, node);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name, node);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation, node);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id, node);\n this.print(node.typeParameters, node, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n if (node.type === \"DeclareClass\") {\n if (node.mixins?.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins, node);\n }\n if (node.implements?.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements, node);\n }\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n const kind = node.variance?.kind;\n if (kind != null) {\n if (kind === \"plus\") {\n this.token(\"+\");\n } else if (kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n this._interfaceish(node);\n}\n\nfunction andSeparator(this: Printer) {\n this.space();\n this.token(\"&\");\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends, node);\n }\n this.space();\n this.print(node.body, node);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: andSeparator });\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types, node);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument, node);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right, node);\n this.semicolon();\n}\n\nexport function TypeAnnotation(this: Printer, node: t.TypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n this._variance(node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id, node);\n this.print(node.typeParameters, node);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype, node);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype, node);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(props, node, {\n addNewlines(leading) {\n if (leading && !props[0]) return 1;\n },\n indent: true,\n statement: true,\n iterator: () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n });\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id, node);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this._variance(node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id, node);\n this.token(\":\");\n this.space();\n }\n this.print(node.key, node);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n this._variance(node);\n this.print(node.key, node);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value, node);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification, node);\n this.token(\".\");\n this.print(node.id, node);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer) {\n this.space();\n this.token(\"|\");\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, node, { separator: orSeparator });\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression, node);\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType, node);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAsdA,IAAAE,OAAA,GAAAF,OAAA;AAGiB;EA3dRG,0BAA0B;EAAEC;AAAW,IAAAL,EAAA;AAIzC,SAASM,iBAAiBA,CAAA,EAAgB;EAC/C,IAAI,CAACC,IAAI,CAAC,KAAK,CAAC;AAClB;AAEO,SAASC,mBAAmBA,CAEjCC,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,WAAW,EAAEF,IAAI,EAAE,IAAI,CAAC;EACxC,IAAI,CAACG,SAAK,GAAI,CAAC;EACf,IAAI,CAACA,SAAK,GAAI,CAAC;AACjB;AAEO,SAASC,qBAAqBA,CAAA,EAAgB;EACnD,IAAI,CAACN,IAAI,CAAC,SAAS,CAAC;AACtB;AAEO,SAASO,4BAA4BA,CAE1CL,IAAoC,EACpC;EACA,IAAI,CAACF,IAAI,CAACE,IAAI,CAACM,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAC1C;AAEO,SAASC,yBAAyBA,CAAA,EAAgB;EACvD,IAAI,CAACT,IAAI,CAAC,MAAM,CAAC;AACnB;AAEO,SAASU,YAAYA,CAE1BR,IAAoB,EACpBS,MAAc,EACd;EACA,IAAI,CAACd,0BAA0B,CAACc,MAAM,CAAC,EAAE;IACvC,IAAI,CAACX,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACY,KAAK,CAAC,CAAC;EACd;EACA,IAAI,CAACZ,IAAI,CAAC,OAAO,CAAC;EAClB,IAAI,CAACY,KAAK,CAAC,CAAC;EACZ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;EAC5E,IAAI,CAACG,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAACuI,UAAU,EAAEvI,IAAI,CAAC;EACjC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACc,cAAc,EAAEd,IAAI,CAAC;EACrC,IAAI,CAACG,SAAK,GAAI,CAAC;AACjB;AAEO,SAASqI,QAAQA,CAAgBxI,IAAgB,EAAE;EACxD,IAAIA,IAAI,CAACoF,IAAI,KAAK,MAAM,EAAE;IACxB,IAAI,CAACjF,SAAK,GAAI,CAAC;EACjB,CAAC,MAAM;IACL,IAAI,CAACA,SAAK,GAAI,CAAC;EACjB;AACF;AAEO,SAASsI,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAAC3I,IAAI,CAAC,MAAM,CAAC;AACnB;AAEO,SAAS4I,iBAAiBA,CAAgB1I,IAAyB,EAAE;EAC1E,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC2I,UAAU,EAAE3I,IAAI,EAAE,IAAI,CAAC;EACvC,IAAI,CAACG,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAAC4I,SAAS,EAAE5I,IAAI,CAAC;EAChC,IAAI,CAACG,SAAK,GAAI,CAAC;AACjB;AAEO,SAAS0I,yBAAyBA,CAEvC7I,IAAiC,EACjC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC2I,UAAU,EAAE3I,IAAI,CAAC;EACjC,IAAIA,IAAI,CAAC0E,QAAQ,EAAE;IACjB,IAAI,CAACvE,KAAK,CAAC,IAAI,CAAC;EAClB;EACA,IAAI,CAACA,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAAC4I,SAAS,EAAE5I,IAAI,CAAC;EAChC,IAAI,CAACG,SAAK,GAAI,CAAC;AACjB"} \ 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 index 8820db09..25ad36b1 100644 --- a/node_modules/@babel/generator/lib/generators/index.js +++ b/node_modules/@babel/generator/lib/generators/index.js @@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); - var _templateLiterals = require("./template-literals"); - Object.keys(_templateLiterals).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _templateLiterals[key]) return; @@ -16,9 +14,7 @@ Object.keys(_templateLiterals).forEach(function (key) { } }); }); - var _expressions = require("./expressions"); - Object.keys(_expressions).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _expressions[key]) return; @@ -29,9 +25,7 @@ Object.keys(_expressions).forEach(function (key) { } }); }); - var _statements = require("./statements"); - Object.keys(_statements).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _statements[key]) return; @@ -42,9 +36,7 @@ Object.keys(_statements).forEach(function (key) { } }); }); - var _classes = require("./classes"); - Object.keys(_classes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _classes[key]) return; @@ -55,9 +47,7 @@ Object.keys(_classes).forEach(function (key) { } }); }); - var _methods = require("./methods"); - Object.keys(_methods).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _methods[key]) return; @@ -68,9 +58,7 @@ Object.keys(_methods).forEach(function (key) { } }); }); - var _modules = require("./modules"); - Object.keys(_modules).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _modules[key]) return; @@ -81,9 +69,7 @@ Object.keys(_modules).forEach(function (key) { } }); }); - var _types = require("./types"); - Object.keys(_types).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _types[key]) return; @@ -94,9 +80,7 @@ Object.keys(_types).forEach(function (key) { } }); }); - var _flow = require("./flow"); - Object.keys(_flow).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _flow[key]) return; @@ -107,9 +91,7 @@ Object.keys(_flow).forEach(function (key) { } }); }); - var _base = require("./base"); - Object.keys(_base).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _base[key]) return; @@ -120,9 +102,7 @@ Object.keys(_base).forEach(function (key) { } }); }); - var _jsx = require("./jsx"); - Object.keys(_jsx).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _jsx[key]) return; @@ -133,9 +113,7 @@ Object.keys(_jsx).forEach(function (key) { } }); }); - var _typescript = require("./typescript"); - Object.keys(_typescript).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _typescript[key]) return; @@ -145,4 +123,6 @@ Object.keys(_typescript).forEach(function (key) { return _typescript[key]; } }); -}); \ No newline at end of file +}); + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/generators/index.js.map b/node_modules/@babel/generator/lib/generators/index.js.map new file mode 100644 index 00000000..3592c313 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_templateLiterals","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_expressions","_statements","_classes","_methods","_modules","_types","_flow","_base","_jsx","_typescript"],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals\";\nexport * from \"./expressions\";\nexport * from \"./statements\";\nexport * from \"./classes\";\nexport * from \"./methods\";\nexport * from \"./modules\";\nexport * from \"./types\";\nexport * from \"./flow\";\nexport * from \"./base\";\nexport * from \"./jsx\";\nexport * from \"./typescript\";\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;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/lib/generators/jsx.js b/node_modules/@babel/generator/lib/generators/jsx.js index 642f33d0..4b8dd7a7 100644 --- a/node_modules/@babel/generator/lib/generators/jsx.js +++ b/node_modules/@babel/generator/lib/generators/jsx.js @@ -4,148 +4,120 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.JSXAttribute = JSXAttribute; +exports.JSXClosingElement = JSXClosingElement; +exports.JSXClosingFragment = JSXClosingFragment; +exports.JSXElement = JSXElement; +exports.JSXEmptyExpression = JSXEmptyExpression; +exports.JSXExpressionContainer = JSXExpressionContainer; +exports.JSXFragment = JSXFragment; exports.JSXIdentifier = JSXIdentifier; -exports.JSXNamespacedName = JSXNamespacedName; exports.JSXMemberExpression = JSXMemberExpression; +exports.JSXNamespacedName = JSXNamespacedName; +exports.JSXOpeningElement = JSXOpeningElement; +exports.JSXOpeningFragment = JSXOpeningFragment; 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; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - function JSXAttribute(node) { this.print(node.name, node); - if (node.value) { - this.token("="); + this.tokenChar(61); this.print(node.value, node); } } - function JSXIdentifier(node) { this.word(node.name); } - function JSXNamespacedName(node) { this.print(node.namespace, node); - this.token(":"); + this.tokenChar(58); this.print(node.name, node); } - function JSXMemberExpression(node) { this.print(node.object, node); - this.token("."); + this.tokenChar(46); this.print(node.property, node); } - function JSXSpreadAttribute(node) { - this.token("{"); + this.tokenChar(123); this.token("..."); this.print(node.argument, node); - this.token("}"); + this.tokenChar(125); } - function JSXExpressionContainer(node) { - this.token("{"); + this.tokenChar(123); this.print(node.expression, node); - this.token("}"); + this.tokenChar(125); } - function JSXSpreadChild(node) { - this.token("{"); + this.tokenChar(123); this.token("..."); this.print(node.expression, node); - this.token("}"); + this.tokenChar(125); } - function JSXText(node) { const raw = this.getPossibleRaw(node); - - if (raw != null) { - this.token(raw); + if (raw !== undefined) { + this.token(raw, true); } else { - this.token(node.value); + this.token(node.value, true); } } - 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.tokenChar(60); 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(">"); + this.tokenChar(62); } } - function JSXClosingElement(node) { this.token(""); + this.tokenChar(62); } - -function JSXEmptyExpression(node) { - this.printInnerComments(node); +function JSXEmptyExpression() { + this.printInnerComments(); } - 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(">"); + this.tokenChar(60); + this.tokenChar(62); } - function JSXClosingFragment() { this.token(""); -} \ No newline at end of file + this.tokenChar(62); +} + +//# sourceMappingURL=jsx.js.map diff --git a/node_modules/@babel/generator/lib/generators/jsx.js.map b/node_modules/@babel/generator/lib/generators/jsx.js.map new file mode 100644 index 00000000..ba43ef71 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/jsx.js.map @@ -0,0 +1 @@ +{"version":3,"names":["JSXAttribute","node","print","name","value","token","JSXIdentifier","word","JSXNamespacedName","namespace","JSXMemberExpression","object","property","JSXSpreadAttribute","argument","JSXExpressionContainer","expression","JSXSpreadChild","JSXText","raw","getPossibleRaw","undefined","JSXElement","open","openingElement","selfClosing","indent","child","children","dedent","closingElement","spaceSeparator","space","JSXOpeningElement","typeParameters","attributes","length","printJoin","separator","JSXClosingElement","JSXEmptyExpression","printInnerComments","JSXFragment","openingFragment","closingFragment","JSXOpeningFragment","JSXClosingFragment"],"sources":["../../src/generators/jsx.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function JSXAttribute(this: Printer, node: t.JSXAttribute) {\n this.print(node.name, node);\n if (node.value) {\n this.token(\"=\");\n this.print(node.value, node);\n }\n}\n\nexport function JSXIdentifier(this: Printer, node: t.JSXIdentifier) {\n this.word(node.name);\n}\n\nexport function JSXNamespacedName(this: Printer, node: t.JSXNamespacedName) {\n this.print(node.namespace, node);\n this.token(\":\");\n this.print(node.name, node);\n}\n\nexport function JSXMemberExpression(\n this: Printer,\n node: t.JSXMemberExpression,\n) {\n this.print(node.object, node);\n this.token(\".\");\n this.print(node.property, node);\n}\n\nexport function JSXSpreadAttribute(this: Printer, node: t.JSXSpreadAttribute) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.argument, node);\n this.token(\"}\");\n}\n\nexport function JSXExpressionContainer(\n this: Printer,\n node: t.JSXExpressionContainer,\n) {\n this.token(\"{\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXSpreadChild(this: Printer, node: t.JSXSpreadChild) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.expression, node);\n this.token(\"}\");\n}\n\nexport function JSXText(this: Printer, node: t.JSXText) {\n const raw = this.getPossibleRaw(node);\n\n if (raw !== undefined) {\n this.token(raw, true);\n } else {\n this.token(node.value, true);\n }\n}\n\nexport function JSXElement(this: Printer, node: t.JSXElement) {\n const open = node.openingElement;\n this.print(open, node);\n if (open.selfClosing) return;\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingElement, node);\n}\n\nfunction spaceSeparator(this: Printer) {\n this.space();\n}\n\nexport function JSXOpeningElement(this: Printer, node: t.JSXOpeningElement) {\n this.token(\"<\");\n this.print(node.name, node);\n this.print(node.typeParameters, node); // TS\n if (node.attributes.length > 0) {\n this.space();\n this.printJoin(node.attributes, node, { separator: spaceSeparator });\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/>\");\n } else {\n this.token(\">\");\n }\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment, node);\n\n this.indent();\n for (const child of node.children) {\n this.print(child, node);\n }\n this.dedent();\n\n this.print(node.closingFragment, node);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAYA,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,EAAEF,IAAI,CAAC;EAC3B,IAAIA,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,GAAI,C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ods.js b/node_modules/@babel/generator/lib/generators/methods.js index f51ab2e7..b91cee2b 100644 --- a/node_modules/@babel/generator/lib/generators/methods.js +++ b/node_modules/@babel/generator/lib/generators/methods.js @@ -3,161 +3,171 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports._params = _params; -exports._parameters = _parameters; -exports._param = _param; +exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; +exports._functionHead = _functionHead; exports._methodHead = _methodHead; +exports._param = _param; +exports._parameters = _parameters; +exports._params = _params; exports._predicate = _predicate; -exports._functionHead = _functionHead; -exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _params(node) { +var _t = require("@babel/types"); +const { + isIdentifier +} = _t; +function _params(node, idNode, parentNode) { this.print(node.typeParameters, node); - this.token("("); - + const nameInfo = _getFuncIdName.call(this, idNode, parentNode); + if (nameInfo) { + this.sourceIdentifierName(nameInfo.name, nameInfo.pos); + } + this.tokenChar(40); this._parameters(node.params, node); - - this.token(")"); - this.print(node.returnType, node); + this.tokenChar(41); + const noLineTerminator = node.type === "ArrowFunctionExpression"; + this.print(node.returnType, node, noLineTerminator); + this._noLineTerminator = noLineTerminator; } - function _parameters(parameters, parent) { - for (let i = 0; i < parameters.length; i++) { + const paramLength = parameters.length; + for (let i = 0; i < paramLength; i++) { this._param(parameters[i], parent); - if (i < parameters.length - 1) { - this.token(","); + this.tokenChar(44); this.space(); } } } - function _param(parameter, parent) { this.printJoin(parameter.decorators, parameter); this.print(parameter, parent); - if (parameter.optional) this.token("?"); + if (parameter.optional) { + this.tokenChar(63); + } this.print(parameter.typeAnnotation, parameter); } - function _methodHead(node) { const kind = node.kind; const key = node.key; - if (kind === "get" || kind === "set") { this.word(kind); this.space(); } - if (node.async) { - this._catchUp("start", key.loc); - - this.word("async"); + this.word("async", true); this.space(); } - if (kind === "method" || kind === "init") { if (node.generator) { - this.token("*"); + this.tokenChar(42); } } - if (node.computed) { - this.token("["); + this.tokenChar(91); this.print(key, node); - this.token("]"); + this.tokenChar(93); } else { this.print(key, node); } - if (node.optional) { - this.token("?"); + this.tokenChar(63); } - - this._params(node); + this._params(node, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, undefined); } - -function _predicate(node) { +function _predicate(node, noLineTerminatorAfter) { if (node.predicate) { if (!node.returnType) { - this.token(":"); + this.tokenChar(58); } - this.space(); - this.print(node.predicate, node); + this.print(node.predicate, node, noLineTerminatorAfter); } } - -function _functionHead(node) { +function _functionHead(node, parent) { if (node.async) { this.word("async"); + this._endsWithInnerRaw = false; this.space(); } - this.word("function"); - if (node.generator) this.token("*"); + if (node.generator) { + this._endsWithInnerRaw = false; + this.tokenChar(42); + } this.space(); - if (node.id) { this.print(node.id, node); } - - this._params(node); - - this._predicate(node); + this._params(node, node.id, parent); + if (node.type !== "TSDeclareFunction") { + this._predicate(node); + } } - -function FunctionExpression(node) { - this._functionHead(node); - +function FunctionExpression(node, parent) { + this._functionHead(node, parent); this.space(); this.print(node.body, node); } - -function ArrowFunctionExpression(node) { +function ArrowFunctionExpression(node, parent) { if (node.async) { - this.word("async"); + this.word("async", true); this.space(); } - - const firstParam = node.params[0]; - - if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) { - if ((this.format.retainLines || node.async) && 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); - } + let firstParam; + if (!this.format.retainLines && node.params.length === 1 && isIdentifier(firstParam = node.params[0]) && !hasTypesOrComments(node, firstParam)) { + this.print(firstParam, node, true); } else { - this._params(node); + this._params(node, undefined, parent); } - - this._predicate(node); - + this._predicate(node, true); this.space(); + this.printInnerComments(); this.token("=>"); this.space(); this.print(node.body, node); } +function hasTypesOrComments(node, param) { + var _param$leadingComment, _param$trailingCommen; + return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length); +} +function _getFuncIdName(idNode, parent) { + let id = idNode; + if (!id && parent) { + const parentType = parent.type; + if (parentType === "VariableDeclarator") { + id = parent.id; + } else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") { + id = parent.left; + } else if (parentType === "ObjectProperty" || parentType === "ClassProperty") { + if (!parent.computed || parent.key.type === "StringLiteral") { + id = parent.key; + } + } else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") { + id = parent.key; + } + } + if (!id) return; + let nameInfo; + if (id.type === "Identifier") { + var _id$loc, _id$loc2; + nameInfo = { + pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start, + name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name + }; + } else if (id.type === "PrivateName") { + var _id$loc3; + nameInfo = { + pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start, + name: "#" + id.id.name + }; + } else if (id.type === "StringLiteral") { + var _id$loc4; + nameInfo = { + pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start, + name: id.value + }; + } + return nameInfo; +} -function hasTypes(node, param) { - return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments; -} \ No newline at end of file +//# sourceMappingURL=methods.js.map diff --git a/node_modules/@babel/generator/lib/generators/methods.js.map b/node_modules/@babel/generator/lib/generators/methods.js.map new file mode 100644 index 00000000..1a42069d --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/methods.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","isIdentifier","_params","node","idNode","parentNode","print","typeParameters","nameInfo","_getFuncIdName","call","sourceIdentifierName","name","pos","token","_parameters","params","noLineTerminator","type","returnType","_noLineTerminator","parameters","parent","paramLength","length","i","_param","space","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","undefined","_predicate","noLineTerminatorAfter","predicate","_functionHead","_endsWithInnerRaw","id","FunctionExpression","body","ArrowFunctionExpression","firstParam","format","retainLines","hasTypesOrComments","printInnerComments","param","_param$leadingComment","_param$trailingCommen","leadingComments","trailingComments","parentType","left","_id$loc","_id$loc2","loc","start","identifierName","_id$loc3","_id$loc4","value"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\nimport { isIdentifier } from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n idNode: t.Expression | t.PrivateName,\n parentNode: NodePath<\n t.Function | t.TSDeclareMethod | t.TSDeclareFunction\n >[\"parent\"],\n) {\n this.print(node.typeParameters, node);\n\n const nameInfo = _getFuncIdName.call(this, idNode, parentNode);\n if (nameInfo) {\n this.sourceIdentifierName(nameInfo.name, nameInfo.pos);\n }\n\n this.token(\"(\");\n this._parameters(node.params, node);\n this.token(\")\");\n\n const noLineTerminator = node.type === \"ArrowFunctionExpression\";\n this.print(node.returnType, node, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n parent:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n this._param(parameters[i], parent);\n\n if (i < parameters.length - 1) {\n this.token(\",\");\n this.space();\n }\n }\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n parent?:\n | t.Function\n | t.TSIndexSignature\n | t.TSDeclareMethod\n | t.TSDeclareFunction\n | t.TSFunctionType\n | t.TSConstructorType,\n) {\n this.printJoin(parameter.decorators, parameter);\n this.print(parameter, parent);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n parameter,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key, node);\n this.token(\"]\");\n } else {\n this.print(key, node);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n this._params(\n node,\n node.computed && node.key.type !== \"StringLiteral\" ? undefined : node.key,\n undefined,\n );\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, node, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n parent: NodePath<\n t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction\n >[\"parent\"],\n) {\n if (node.async) {\n this.word(\"async\");\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n this.token(\"*\");\n }\n\n this.space();\n if (node.id) {\n this.print(node.id, node);\n }\n\n this._params(node, node.id, parent);\n if (node.type !== \"TSDeclareFunction\") {\n this._predicate(node);\n }\n}\n\nexport function FunctionExpression(\n this: Printer,\n node: t.FunctionExpression,\n parent: NodePath[\"parent\"],\n) {\n this._functionHead(node, parent);\n this.space();\n this.print(node.body, node);\n}\n\nexport { FunctionExpression as FunctionDeclaration };\n\nexport function ArrowFunctionExpression(\n this: Printer,\n node: t.ArrowFunctionExpression,\n parent: NodePath[\"parent\"],\n) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n // Try to avoid printing parens in simple cases, but only if we're pretty\n // sure that they aren't needed by type annotations or potential newlines.\n let firstParam;\n if (\n !this.format.retainLines &&\n node.params.length === 1 &&\n isIdentifier((firstParam = node.params[0])) &&\n !hasTypesOrComments(node, firstParam)\n ) {\n this.print(firstParam, node, true);\n } else {\n this._params(node, undefined, parent);\n }\n\n this._predicate(node, true);\n this.space();\n // When printing (x)/*1*/=>{}, we remove the parentheses\n // and thus there aren't two contiguous inner tokens.\n // We forcefully print inner comments here.\n this.printInnerComments();\n this.token(\"=>\");\n\n this.space();\n\n this.print(node.body, node);\n}\n\nfunction hasTypesOrComments(\n node: t.ArrowFunctionExpression,\n param: t.Identifier,\n): boolean {\n return !!(\n node.typeParameters ||\n node.returnType ||\n node.predicate ||\n param.typeAnnotation ||\n param.optional ||\n // Flow does not support `foo /*: string*/ => {};`\n param.leadingComments?.length ||\n param.trailingComments?.length\n );\n}\n\nfunction _getFuncIdName(\n this: Printer,\n idNode: t.Expression | t.PrivateName,\n parent: NodePath<\n t.Function | t.TSDeclareMethod | t.TSDeclareFunction\n >[\"parent\"],\n) {\n let id: t.Expression | t.PrivateName | t.LVal = idNode;\n\n if (!id && parent) {\n const parentType = parent.type;\n\n if (parentType === \"VariableDeclarator\") {\n id = parent.id;\n } else if (\n parentType === \"AssignmentExpression\" ||\n parentType === \"AssignmentPattern\"\n ) {\n id = parent.left;\n } else if (\n parentType === \"ObjectProperty\" ||\n parentType === \"ClassProperty\"\n ) {\n if (!parent.computed || parent.key.type === \"StringLiteral\") {\n id = parent.key;\n }\n } else if (\n parentType === \"ClassPrivateProperty\" ||\n parentType === \"ClassAccessorProperty\"\n ) {\n id = parent.key;\n }\n }\n\n if (!id) return;\n\n let nameInfo;\n\n if (id.type === \"Identifier\") {\n nameInfo = {\n pos: id.loc?.start,\n name:\n // @ts-expect-error Undocumented property identifierName\n id.loc?.identifierName || id.name,\n };\n } else if (id.type === \"PrivateName\") {\n nameInfo = {\n pos: id.loc?.start,\n name: \"#\" + id.id.name,\n };\n } else if (id.type === \"StringLiteral\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.value,\n };\n }\n\n return nameInfo;\n}\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAA4C;EAAnCC;AAAY,IAAAF,EAAA;AAGd,SAASG,OAAOA,CAErBC,IAA0D,EAC1DC,MAAoC,EACpCC,UAEW,EACX;EACA,IAAI,CAACC,KAAK,CAACH,IAAI,CAACI,cAAc,EAAEJ,IAAI,CAAC;EA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AA;IACpC3D,QAAQ,GAAG;MACTK,GAAG,GAAAsD,QAAA,GAAErB,EAAE,CAACkB,GAAG,qBAANG,QAAA,CAAQF,KAAK;MAClBrD,IAAI,EAAE,GAAG,GAAGkC,EAAE,CAACA,EAAE,CAAClC;IACpB,CAAC;EACH,CAAC,MAAM,IAAIkC,EAAE,CAAC5B,IAAI,KAAK,eAAe,EAAE;IAAA,IAAAkD,QAAA;IACtC5D,QAAQ,GAAG;MACTK,GAAG,GAAAuD,QAAA,GAAEtB,EAAE,CAACkB,GAAG,qBAANI,QAAA,CAAQH,KAAK;MAClBrD,IAAI,EAAEkC,EAAE,CAACuB;IACX,CAAC;EACH;EAEA,OAAO7D,QAAQ;AACjB"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/generator/lib/generators/modules.js index 9d47df64..b5691d5e 100644 --- a/node_modules/@babel/generator/lib/generators/modules.js +++ b/node_modules/@babel/generator/lib/generators/modules.js @@ -3,32 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.ImportSpecifier = ImportSpecifier; -exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.ExportSpecifier = ExportSpecifier; -exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; exports.ExportAllDeclaration = ExportAllDeclaration; -exports.ExportNamedDeclaration = ExportNamedDeclaration; exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.ImportDeclaration = ImportDeclaration; +exports.ExportDefaultSpecifier = ExportDefaultSpecifier; +exports.ExportNamedDeclaration = ExportNamedDeclaration; +exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; +exports.ExportSpecifier = ExportSpecifier; exports.ImportAttribute = ImportAttribute; +exports.ImportDeclaration = ImportDeclaration; +exports.ImportDefaultSpecifier = ImportDefaultSpecifier; exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.ImportSpecifier = ImportSpecifier; +exports._printAttributes = _printAttributes; +var _t = require("@babel/types"); +const { + isClassDeclaration, + isExportDefaultSpecifier, + isExportNamespaceSpecifier, + isImportDefaultSpecifier, + isImportNamespaceSpecifier, + isStatement +} = _t; function ImportSpecifier(node) { if (node.importKind === "type" || node.importKind === "typeof") { this.word(node.importKind); this.space(); } - this.print(node.imported, node); - if (node.local && node.local.name !== node.imported.name) { this.space(); this.word("as"); @@ -36,18 +37,18 @@ function ImportSpecifier(node) { this.print(node.local, node); } } - function ImportDefaultSpecifier(node) { this.print(node.local, node); } - function ExportDefaultSpecifier(node) { this.print(node.exported, node); } - function ExportSpecifier(node) { + if (node.exportKind === "type") { + this.word("type"); + this.space(); + } this.print(node.local, node); - if (node.exported && node.local.name !== node.exported.name) { this.space(); this.word("as"); @@ -55,175 +56,199 @@ function ExportSpecifier(node) { this.print(node.exported, node); } } - function ExportNamespaceSpecifier(node) { - this.token("*"); + this.tokenChar(42); this.space(); this.word("as"); this.space(); this.print(node.exported, node); } - +let warningShown = false; +function _printAttributes(node) { + const { + importAttributesKeyword + } = this.format; + const { + attributes, + assertions + } = node; + if (attributes && !importAttributesKeyword && !warningShown) { + warningShown = true; + console.warn(`\ +You are using import attributes, without specifying the desired output syntax. +Please specify the "importAttributesKeyword" generator option, whose value can be one of: + - "with" : \`import { a } from "b" with { type: "json" };\` + - "assert" : \`import { a } from "b" assert { type: "json" };\` + - "with-legacy" : \`import { a } from "b" with type: "json";\` +`); + } + const useAssertKeyword = importAttributesKeyword === "assert" || !importAttributesKeyword && assertions; + this.word(useAssertKeyword ? "assert" : "with"); + this.space(); + if (!useAssertKeyword && importAttributesKeyword !== "with") { + this.printList(attributes || assertions, node); + return; + } + this.tokenChar(123); + this.space(); + this.printList(attributes || assertions, node); + this.space(); + this.tokenChar(125); +} function ExportAllDeclaration(node) { + var _node$attributes, _node$assertions; this.word("export"); this.space(); - if (node.exportKind === "type") { this.word("type"); this.space(); } - - this.token("*"); + this.tokenChar(42); this.space(); this.word("from"); this.space(); - this.print(node.source, node); - this.printAssertions(node); + if ((_node$attributes = node.attributes) != null && _node$attributes.length || (_node$assertions = node.assertions) != null && _node$assertions.length) { + this.print(node.source, node, true); + this.space(); + this._printAttributes(node); + } else { + this.print(node.source, node); + } this.semicolon(); } - -function ExportNamedDeclaration(node) { - if (this.format.decoratorsBeforeExport && t.isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); +function maybePrintDecoratorsBeforeExport(printer, node) { + if (isClassDeclaration(node.declaration) && printer._shouldPrintDecoratorsBeforeExport(node)) { + printer.printJoin(node.declaration.decorators, node); } - - this.word("export"); - this.space(); - ExportDeclaration.apply(this, arguments); } - -function ExportDefaultDeclaration(node) { - if (this.format.decoratorsBeforeExport && t.isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - +function ExportNamedDeclaration(node) { + maybePrintDecoratorsBeforeExport(this, node); this.word("export"); this.space(); - this.word("default"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDeclaration(node) { if (node.declaration) { const declar = node.declaration; this.print(declar, node); - if (!t.isStatement(declar)) this.semicolon(); + if (!isStatement(declar)) this.semicolon(); } else { if (node.exportKind === "type") { this.word("type"); this.space(); } - const specifiers = node.specifiers.slice(0); let hasSpecial = false; - for (;;) { const first = specifiers[0]; - - if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) { + if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) { hasSpecial = true; this.print(specifiers.shift(), node); - if (specifiers.length) { - this.token(","); + this.tokenChar(44); this.space(); } } else { break; } } - if (specifiers.length || !specifiers.length && !hasSpecial) { - this.token("{"); - + this.tokenChar(123); if (specifiers.length) { this.space(); this.printList(specifiers, node); this.space(); } - - this.token("}"); + this.tokenChar(125); } - if (node.source) { + var _node$attributes2, _node$assertions2; this.space(); this.word("from"); this.space(); - this.print(node.source, node); - this.printAssertions(node); + if ((_node$attributes2 = node.attributes) != null && _node$attributes2.length || (_node$assertions2 = node.assertions) != null && _node$assertions2.length) { + this.print(node.source, node, true); + this.space(); + this._printAttributes(node); + } else { + this.print(node.source, node); + } } - this.semicolon(); } } - +function ExportDefaultDeclaration(node) { + maybePrintDecoratorsBeforeExport(this, node); + this.word("export"); + this.noIndentInnerCommentsHere(); + this.space(); + this.word("default"); + this.space(); + const declar = node.declaration; + this.print(declar, node); + if (!isStatement(declar)) this.semicolon(); +} function ImportDeclaration(node) { - var _node$attributes; - + var _node$attributes3, _node$assertions3; this.word("import"); this.space(); - - if (node.importKind === "type" || node.importKind === "typeof") { + const isTypeKind = node.importKind === "type" || node.importKind === "typeof"; + if (isTypeKind) { + this.noIndentInnerCommentsHere(); this.word(node.importKind); this.space(); + } else if (node.module) { + this.noIndentInnerCommentsHere(); + this.word("module"); + this.space(); } - const specifiers = node.specifiers.slice(0); - - if (specifiers != null && specifiers.length) { - for (;;) { - const first = specifiers[0]; - - if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift(), node); - - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; + const hasSpecifiers = !!specifiers.length; + while (hasSpecifiers) { + const first = specifiers[0]; + if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) { + this.print(specifiers.shift(), node); + if (specifiers.length) { + this.tokenChar(44); + this.space(); } + } else { + break; } - - if (specifiers.length) { - this.token("{"); - this.space(); - this.printList(specifiers, node); - this.space(); - this.token("}"); - } - + } + if (specifiers.length) { + this.tokenChar(123); this.space(); - this.word("from"); + this.printList(specifiers, node); this.space(); + this.tokenChar(125); + } else if (isTypeKind && !hasSpecifiers) { + this.tokenChar(123); + this.tokenChar(125); } - - this.print(node.source, node); - this.printAssertions(node); - - if ((_node$attributes = node.attributes) != null && _node$attributes.length) { + if (hasSpecifiers || isTypeKind) { this.space(); - this.word("with"); + this.word("from"); this.space(); - this.printList(node.attributes, node); } - + if ((_node$attributes3 = node.attributes) != null && _node$attributes3.length || (_node$assertions3 = node.assertions) != null && _node$assertions3.length) { + this.print(node.source, node, true); + this.space(); + this._printAttributes(node); + } else { + this.print(node.source, node); + } this.semicolon(); } - function ImportAttribute(node) { this.print(node.key); - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.value); } - function ImportNamespaceSpecifier(node) { - this.token("*"); + this.tokenChar(42); this.space(); this.word("as"); this.space(); this.print(node.local, node); -} \ No newline at end of file +} + +//# sourceMappingURL=modules.js.map diff --git a/node_modules/@babel/generator/lib/generators/modules.js.map b/node_modules/@babel/generator/lib/generators/modules.js.map new file mode 100644 index 00000000..1b341296 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/modules.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","isClassDeclaration","isExportDefaultSpecifier","isExportNamespaceSpecifier","isImportDefaultSpecifier","isImportNamespaceSpecifier","isStatement","ImportSpecifier","node","importKind","word","space","print","imported","local","name","ImportDefaultSpecifier","ExportDefaultSpecifier","exported","ExportSpecifier","exportKind","ExportNamespaceSpecifier","token","warningShown","_printAttributes","importAttributesKeyword","format","attributes","assertions","console","warn","useAssertKeyword","printList","ExportAllDeclaration","_node$attributes","_node$assertions","length","source","semicolon","maybePrintDecoratorsBeforeExport","printer","declaration","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","ExportNamedDeclaration","declar","specifiers","slice","hasSpecial","first","shift","_node$attributes2","_node$assertions2","ExportDefaultDeclaration","noIndentInnerCommentsHere","ImportDeclaration","_node$attributes3","_node$assertions3","isTypeKind","module","hasSpecifiers","ImportAttribute","key","value","ImportNamespaceSpecifier"],"sources":["../../src/generators/modules.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isClassDeclaration,\n isExportDefaultSpecifier,\n isExportNamespaceSpecifier,\n isImportDefaultSpecifier,\n isImportNamespaceSpecifier,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function ImportSpecifier(this: Printer, node: t.ImportSpecifier) {\n if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n this.word(node.importKind);\n this.space();\n }\n\n this.print(node.imported, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.local && node.local.name !== node.imported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n }\n}\n\nexport function ImportDefaultSpecifier(\n this: Printer,\n node: t.ImportDefaultSpecifier,\n) {\n this.print(node.local, node);\n}\n\nexport function ExportDefaultSpecifier(\n this: Printer,\n node: t.ExportDefaultSpecifier,\n) {\n this.print(node.exported, node);\n}\n\nexport function ExportSpecifier(this: Printer, node: t.ExportSpecifier) {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n this.print(node.local, node);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.exported && node.local.name !== node.exported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n }\n}\n\nexport function ExportNamespaceSpecifier(\n this: Printer,\n node: t.ExportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported, node);\n}\n\nlet warningShown = false;\n\nexport function _printAttributes(\n this: Printer,\n node: Extract,\n) {\n const { importAttributesKeyword } = this.format;\n const { attributes, assertions } = node;\n\n if (\n attributes &&\n !importAttributesKeyword &&\n // In the production build only show the warning once.\n // We want to show it per-usage locally for tests.\n (!process.env.IS_PUBLISH || !warningShown)\n ) {\n warningShown = true;\n console.warn(`\\\nYou are using import attributes, without specifying the desired output syntax.\nPlease specify the \"importAttributesKeyword\" generator option, whose value can be one of:\n - \"with\" : \\`import { a } from \"b\" with { type: \"json\" };\\`\n - \"assert\" : \\`import { a } from \"b\" assert { type: \"json\" };\\`\n - \"with-legacy\" : \\`import { a } from \"b\" with type: \"json\";\\`\n`);\n }\n\n const useAssertKeyword =\n importAttributesKeyword === \"assert\" ||\n (!importAttributesKeyword && assertions);\n\n this.word(useAssertKeyword ? \"assert\" : \"with\");\n this.space();\n\n if (!useAssertKeyword && importAttributesKeyword !== \"with\") {\n // with-legacy\n this.printList(attributes || assertions, node);\n return;\n }\n\n this.token(\"{\");\n this.space();\n this.printList(attributes || assertions, node);\n this.space();\n this.token(\"}\");\n}\n\nexport function ExportAllDeclaration(\n this: Printer,\n node: t.ExportAllDeclaration | t.DeclareExportAllDeclaration,\n) {\n this.word(\"export\");\n this.space();\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n this.token(\"*\");\n this.space();\n this.word(\"from\");\n this.space();\n // @ts-expect-error Fixme: attributes is not defined in DeclareExportAllDeclaration\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n // @ts-expect-error Fixme: attributes is not defined in DeclareExportAllDeclaration\n this._printAttributes(node);\n } else {\n this.print(node.source, node);\n }\n\n this.semicolon();\n}\n\nfunction maybePrintDecoratorsBeforeExport(\n printer: Printer,\n node: t.ExportNamedDeclaration | t.ExportDefaultDeclaration,\n) {\n if (\n isClassDeclaration(node.declaration) &&\n printer._shouldPrintDecoratorsBeforeExport(\n node as t.ExportNamedDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n printer.printJoin(node.declaration.decorators, node);\n }\n}\n\nexport function ExportNamedDeclaration(\n this: Printer,\n node: t.ExportNamedDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.space();\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n } else {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n\n // print \"special\" specifiers first\n let hasSpecial = false;\n for (;;) {\n const first = specifiers[0];\n if (\n isExportDefaultSpecifier(first) ||\n isExportNamespaceSpecifier(first)\n ) {\n hasSpecial = true;\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length || (!specifiers.length && !hasSpecial)) {\n this.token(\"{\");\n if (specifiers.length) {\n this.space();\n this.printList(specifiers, node);\n this.space();\n }\n this.token(\"}\");\n }\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAttributes(node);\n } else {\n this.print(node.source, node);\n }\n }\n\n this.semicolon();\n }\n}\n\nexport function ExportDefaultDeclaration(\n this: Printer,\n node: t.ExportDefaultDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.noIndentInnerCommentsHere();\n this.space();\n this.word(\"default\");\n this.space();\n const declar = node.declaration;\n this.print(declar, node);\n if (!isStatement(declar)) this.semicolon();\n}\n\nexport function ImportDeclaration(this: Printer, node: t.ImportDeclaration) {\n this.word(\"import\");\n this.space();\n\n const isTypeKind = node.importKind === \"type\" || node.importKind === \"typeof\";\n if (isTypeKind) {\n this.noIndentInnerCommentsHere();\n this.word(node.importKind);\n this.space();\n } else if (node.module) {\n this.noIndentInnerCommentsHere();\n this.word(\"module\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n const hasSpecifiers = !!specifiers.length;\n // print \"special\" specifiers first. The loop condition is constant,\n // but there is a \"break\" in the body.\n while (hasSpecifiers) {\n const first = specifiers[0];\n if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n this.print(specifiers.shift(), node);\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n if (specifiers.length) {\n this.token(\"{\");\n this.space();\n this.printList(specifiers, node);\n this.space();\n this.token(\"}\");\n } else if (isTypeKind && !hasSpecifiers) {\n this.token(\"{\");\n this.token(\"}\");\n }\n\n if (hasSpecifiers || isTypeKind) {\n this.space();\n this.word(\"from\");\n this.space();\n }\n\n if (node.attributes?.length || node.assertions?.length) {\n this.print(node.source, node, true);\n this.space();\n this._printAttributes(node);\n } else {\n this.print(node.source, node);\n }\n\n this.semicolon();\n}\n\nexport function ImportAttribute(this: Printer, node: t.ImportAttribute) {\n this.print(node.key);\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ImportNamespaceSpecifier(\n this: Printer,\n node: t.ImportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local, node);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAOsB;EANpBC,kBAAkB;EAClBC,wBAAwB;EACxBC,0BAA0B;EAC1BC,wBAAwB;EACxBC,0BAA0B;EAC1BC;AAAW,IAAAP,EAAA;AAIN,SAASQ,eAAeA,CAAgBC,IAAuB,EAAE;EACtE,IAAIA,IAAI,CAACC,UAAU,KAAK,MAAM,IAAID,IAAI,CAACC,UAAU,KAAK,QAAQ,EAAE;IAC9D,IAAI,CAACC,IAAI,CAACF,IAAI,CAACC,UAAU,CAAC;IAC1B,IAAI,CAACE,KAAK,CAAC,CAAC;EACd;EAEA,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,QAAQ,EAAEL,IAAI,CAAC;EAE/B,IAAIA,IAAI,CAACM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EAAEN,IAAI,CAAC;AAC9B"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/generator/lib/generators/statements.js index a719b9ec..dee0ad81 100644 --- a/node_modules/@babel/generator/lib/generators/statements.js +++ b/node_modules/@babel/generator/lib/generators/statements.js @@ -3,132 +3,124 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.WithStatement = WithStatement; -exports.IfStatement = IfStatement; -exports.ForStatement = ForStatement; -exports.WhileStatement = WhileStatement; +exports.BreakStatement = BreakStatement; +exports.CatchClause = CatchClause; +exports.ContinueStatement = ContinueStatement; +exports.DebuggerStatement = DebuggerStatement; exports.DoWhileStatement = DoWhileStatement; +exports.ForOfStatement = exports.ForInStatement = void 0; +exports.ForStatement = ForStatement; +exports.IfStatement = IfStatement; exports.LabeledStatement = LabeledStatement; -exports.TryStatement = TryStatement; -exports.CatchClause = CatchClause; -exports.SwitchStatement = SwitchStatement; +exports.ReturnStatement = ReturnStatement; exports.SwitchCase = SwitchCase; -exports.DebuggerStatement = DebuggerStatement; +exports.SwitchStatement = SwitchStatement; +exports.ThrowStatement = ThrowStatement; +exports.TryStatement = TryStatement; exports.VariableDeclaration = VariableDeclaration; exports.VariableDeclarator = VariableDeclarator; -exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.WhileStatement = WhileStatement; +exports.WithStatement = WithStatement; +var _t = require("@babel/types"); +const { + isFor, + isForStatement, + isIfStatement, + isStatement +} = _t; function WithStatement(node) { this.word("with"); this.space(); - this.token("("); + this.tokenChar(40); this.print(node.object, node); - this.token(")"); + this.tokenChar(41); this.printBlock(node); } - function IfStatement(node) { this.word("if"); this.space(); - this.token("("); + this.tokenChar(40); this.print(node.test, node); - this.token(")"); + this.tokenChar(41); this.space(); - const needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent)); - + const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent)); if (needsBlock) { - this.token("{"); + this.tokenChar(123); this.newline(); this.indent(); } - this.printAndIndentOnComments(node.consequent, node); - if (needsBlock) { this.dedent(); this.newline(); - this.token("}"); + this.tokenChar(125); } - if (node.alternate) { - if (this.endsWith("}")) this.space(); + if (this.endsWith(125)) this.space(); this.word("else"); this.space(); this.printAndIndentOnComments(node.alternate, node); } } - function getLastStatement(statement) { - if (!t.isStatement(statement.body)) return statement; - return getLastStatement(statement.body); + const { + body + } = statement; + if (isStatement(body) === false) { + return statement; + } + return getLastStatement(body); } - function ForStatement(node) { this.word("for"); this.space(); - this.token("("); + this.tokenChar(40); this.inForStatementInitCounter++; this.print(node.init, node); this.inForStatementInitCounter--; - this.token(";"); - + this.tokenChar(59); if (node.test) { this.space(); this.print(node.test, node); } - - this.token(";"); - + this.tokenChar(59); if (node.update) { this.space(); this.print(node.update, node); } - - this.token(")"); + this.tokenChar(41); this.printBlock(node); } - function WhileStatement(node) { this.word("while"); this.space(); - this.token("("); + this.tokenChar(40); this.print(node.test, node); - this.token(")"); + this.tokenChar(41); this.printBlock(node); } - -const buildForXStatement = function (op) { - return function (node) { - this.word("for"); - this.space(); - - if (op === "of" && node.await) { - this.word("await"); - this.space(); - } - - this.token("("); - this.print(node.left, node); - this.space(); - this.word(op); +function ForXStatement(node) { + this.word("for"); + this.space(); + const isForOf = node.type === "ForOfStatement"; + if (isForOf && node.await) { + this.word("await"); this.space(); - this.print(node.right, node); - this.token(")"); - this.printBlock(node); - }; -}; - -const ForInStatement = buildForXStatement("in"); + } + this.noIndentInnerCommentsHere(); + this.tokenChar(40); + this.print(node.left, node); + this.space(); + this.word(isForOf ? "of" : "in"); + this.space(); + this.print(node.right, node); + this.tokenChar(41); + this.printBlock(node); +} +const ForInStatement = ForXStatement; exports.ForInStatement = ForInStatement; -const ForOfStatement = buildForXStatement("of"); +const ForOfStatement = ForXStatement; exports.ForOfStatement = ForOfStatement; - function DoWhileStatement(node) { this.word("do"); this.space(); @@ -136,57 +128,50 @@ function DoWhileStatement(node) { this.space(); this.word("while"); this.space(); - this.token("("); + this.tokenChar(40); this.print(node.test, node); - this.token(")"); + this.tokenChar(41); this.semicolon(); } - -function buildLabelStatement(prefix, key = "label") { - return function (node) { - this.word(prefix); - const label = node[key]; - - if (label) { - this.space(); - const isLabel = key == "label"; - const terminatorState = this.startTerminatorless(isLabel); - this.print(label, node); - this.endTerminatorless(terminatorState); - } - - this.semicolon(); - }; +function printStatementAfterKeyword(printer, node, parent, isLabel) { + if (node) { + printer.space(); + printer.printTerminatorless(node, parent, isLabel); + } + printer.semicolon(); +} +function BreakStatement(node) { + this.word("break"); + printStatementAfterKeyword(this, node.label, node, true); +} +function ContinueStatement(node) { + this.word("continue"); + printStatementAfterKeyword(this, node.label, node, true); +} +function ReturnStatement(node) { + this.word("return"); + printStatementAfterKeyword(this, node.argument, node, false); +} +function ThrowStatement(node) { + this.word("throw"); + printStatementAfterKeyword(this, node.argument, node, false); } - -const ContinueStatement = buildLabelStatement("continue"); -exports.ContinueStatement = ContinueStatement; -const ReturnStatement = buildLabelStatement("return", "argument"); -exports.ReturnStatement = ReturnStatement; -const BreakStatement = buildLabelStatement("break"); -exports.BreakStatement = BreakStatement; -const ThrowStatement = buildLabelStatement("throw", "argument"); -exports.ThrowStatement = ThrowStatement; - function LabeledStatement(node) { this.print(node.label, node); - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.body, node); } - function TryStatement(node) { this.word("try"); this.space(); this.print(node.block, node); this.space(); - if (node.handlers) { this.print(node.handlers[0], node); } else { this.print(node.handler, node); } - if (node.finalizer) { this.space(); this.word("finally"); @@ -194,52 +179,44 @@ function TryStatement(node) { this.print(node.finalizer, node); } } - function CatchClause(node) { this.word("catch"); this.space(); - if (node.param) { - this.token("("); + this.tokenChar(40); this.print(node.param, node); this.print(node.param.typeAnnotation, node); - this.token(")"); + this.tokenChar(41); this.space(); } - this.print(node.body, node); } - function SwitchStatement(node) { this.word("switch"); this.space(); - this.token("("); + this.tokenChar(40); this.print(node.discriminant, node); - this.token(")"); + this.tokenChar(41); this.space(); - this.token("{"); + this.tokenChar(123); this.printSequence(node.cases, node, { indent: true, - addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; } - }); - this.token("}"); + this.rightBrace(node); } - function SwitchCase(node) { if (node.test) { this.word("case"); this.space(); this.print(node.test, node); - this.token(":"); + this.tokenChar(58); } else { this.word("default"); - this.token(":"); + this.tokenChar(58); } - if (node.consequent.length) { this.newline(); this.printSequence(node.consequent, node, { @@ -247,72 +224,54 @@ function SwitchCase(node) { }); } } - function DebuggerStatement() { this.word("debugger"); this.semicolon(); } - -function variableDeclarationIndent() { - this.token(","); - this.newline(); - 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 (let i = 0; i < 6; i++) this.space(true); -} - function VariableDeclaration(node, parent) { if (node.declare) { this.word("declare"); this.space(); } - - this.word(node.kind); + const { + kind + } = node; + this.word(kind, kind === "using" || kind === "await using"); this.space(); let hasInits = false; - - if (!t.isFor(parent)) { + if (!isFor(parent)) { for (const declar of node.declarations) { if (declar.init) { hasInits = true; } } } - - let separator; - - if (hasInits) { - separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent; - } - this.printList(node.declarations, node, { - separator + separator: hasInits ? function () { + this.tokenChar(44); + this.newline(); + } : undefined, + indent: node.declarations.length > 1 ? true : false }); - - if (t.isFor(parent)) { - if (t.isForStatement(parent)) { + if (isFor(parent)) { + if (isForStatement(parent)) { if (parent.init === node) return; } else { if (parent.left === node) return; } } - this.semicolon(); } - function VariableDeclarator(node) { this.print(node.id, node); - if (node.definite) this.token("!"); + if (node.definite) this.tokenChar(33); this.print(node.id.typeAnnotation, node); - if (node.init) { this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(node.init, node); } -} \ No newline at end of file +} + +//# sourceMappingURL=statements.js.map diff --git a/node_modules/@babel/generator/lib/generators/statements.js.map b/node_modules/@babel/generator/lib/generators/statements.js.map new file mode 100644 index 00000000..f093f9f0 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/statements.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","isFor","isForStatement","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","body","ForStatement","inForStatementInitCounter","init","update","WhileStatement","ForXStatement","isForOf","type","await","noIndentInnerCommentsHere","left","right","ForInStatement","exports","ForOfStatement","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","parent","isLabel","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","addNewlines","leading","cas","length","rightBrace","SwitchCase","DebuggerStatement","VariableDeclaration","declare","kind","hasInits","declar","declarations","printList","separator","undefined","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport {\n isFor,\n isForStatement,\n isIfStatement,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent, node);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate, node);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n this.inForStatementInitCounter++;\n this.print(node.init, node);\n this.inForStatementInitCounter--;\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test, node);\n }\n this.token(\";\");\n\n if (node.update) {\n this.space();\n this.print(node.update, node);\n }\n\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nfunction ForXStatement(this: Printer, node: t.ForXStatement) {\n this.word(\"for\");\n this.space();\n const isForOf = node.type === \"ForOfStatement\";\n if (isForOf && node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n this.print(node.left, node);\n this.space();\n this.word(isForOf ? \"of\" : \"in\");\n this.space();\n this.print(node.right, node);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport const ForInStatement = ForXStatement;\nexport const ForOfStatement = ForXStatement;\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body, node);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test, node);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(\n printer: Printer,\n node: t.Node,\n parent: t.Node,\n isLabel: boolean,\n) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node, parent, isLabel);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label, node, true);\n}\n\nexport function ReturnStatement(this: Printer, node: t.ReturnStatement) {\n this.word(\"return\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function ThrowStatement(this: Printer, node: t.ThrowStatement) {\n this.word(\"throw\");\n printStatementAfterKeyword(this, node.argument, node, false);\n}\n\nexport function LabeledStatement(this: Printer, node: t.LabeledStatement) {\n this.print(node.label, node);\n this.token(\":\");\n this.space();\n this.print(node.body, node);\n}\n\nexport function TryStatement(this: Printer, node: t.TryStatement) {\n this.word(\"try\");\n this.space();\n this.print(node.block, node);\n this.space();\n\n // Esprima bug puts the catch clause in a `handlers` array.\n // see https://code.google.com/p/esprima/issues/detail?id=433\n // We run into this from regenerator generated ast.\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n if (node.handlers) {\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n this.print(node.handlers[0], node);\n } else {\n this.print(node.handler, node);\n }\n\n if (node.finalizer) {\n this.space();\n this.word(\"finally\");\n this.space();\n this.print(node.finalizer, node);\n }\n}\n\nexport function CatchClause(this: Printer, node: t.CatchClause) {\n this.word(\"catch\");\n this.space();\n if (node.param) {\n this.token(\"(\");\n this.print(node.param, node);\n this.print(node.param.typeAnnotation, node);\n this.token(\")\");\n this.space();\n }\n this.print(node.body, node);\n}\n\nexport function SwitchStatement(this: Printer, node: t.SwitchStatement) {\n this.word(\"switch\");\n this.space();\n this.token(\"(\");\n this.print(node.discriminant, node);\n this.token(\")\");\n this.space();\n this.token(\"{\");\n\n this.printSequence(node.cases, node, {\n indent: true,\n addNewlines(leading, cas) {\n if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n },\n });\n\n this.rightBrace(node);\n}\n\nexport function SwitchCase(this: Printer, node: t.SwitchCase) {\n if (node.test) {\n this.word(\"case\");\n this.space();\n this.print(node.test, node);\n this.token(\":\");\n } else {\n this.word(\"default\");\n this.token(\":\");\n }\n\n if (node.consequent.length) {\n this.newline();\n this.printSequence(node.consequent, node, { indent: true });\n }\n}\n\nexport function DebuggerStatement(this: Printer) {\n this.word(\"debugger\");\n this.semicolon();\n}\n\nexport function VariableDeclaration(\n this: Printer,\n node: t.VariableDeclaration,\n parent: t.Node,\n) {\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n const { kind } = node;\n this.word(kind, kind === \"using\" || kind === \"await using\");\n this.space();\n\n let hasInits = false;\n // don't add whitespace to loop heads\n if (!isFor(parent)) {\n for (const declar of node.declarations) {\n if (declar.init) {\n // has an init so let's split it up over multiple lines\n hasInits = true;\n }\n }\n }\n\n //\n // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on\n // this will format declarations like:\n //\n // let foo = \"bar\", bar = \"foo\";\n //\n // into\n //\n // let foo = \"bar\",\n // bar = \"foo\";\n //\n\n this.printList(node.declarations, node, {\n separator: hasInits\n ? function (this: Printer) {\n this.token(\",\");\n this.newline();\n }\n : undefined,\n indent: node.declarations.length > 1 ? true : false,\n });\n\n if (isFor(parent)) {\n // don't give semicolons to these nodes since they'll be inserted in the parent generator\n if (isForStatement(parent)) {\n if (parent.init === node) return;\n } else {\n if (parent.left === node) return;\n }\n }\n\n this.semicolon();\n}\n\nexport function VariableDeclarator(this: Printer, node: t.VariableDeclarator) {\n this.print(node.id, node);\n if (node.definite) this.token(\"!\"); // TS\n // @ts-expect-error todo(flow-ts) Property 'typeAnnotation' does not exist on type 'MemberExpression'.\n this.print(node.id.typeAnnotation, node);\n if (node.init) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.init, node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAKsB;EAJpBC,KAAK;EACLC,cAAc;EACdC,aAAa;EACbC;AAAW,IAAAL,EAAA;AAKN,SAASM,aAAaA,CAAgBC,IAAqB,EAAE;EAClE,IAAI,CAACC,IAAI,CAAC,MAAM,CAAC;EACjB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,MAAM,EAAEL,IAAI,CAAC;EAC7B,IAAI,CAACG,SAAK,GAAI,CAAC;EACf,IAAI,CAACG,UAAU,CAACN,IAAI,CAAC;AACvB;AAEO,SAASO,WAAWA,CAAgBP,IAAmB,EAAE;EAC9D,IAAI,CAACC,IAAI,CAAC,IAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACQ,IAAI,EAAER,IAAI,CAAC;EAC3B,IAAI,CAACG,SAAK,GAAI,CAAC;EACf,IAAI,CAACD,KAAK,CAAC,CAAC;EAEZ,MAAMO,UAAU,GACdT,IAAI,CAACU,SAAS,IAAIb,aAAa,CAACc,gBAAgB,CAACX,IAAI,CAACY,UAAU,CAAC,CAAC;EACpE,IAAIH,U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AI,CAAC;EACxC,IAAIA,IAAI,CAACsB,IAAI,EAAE;IACb,IAAI,CAACpB,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,SAAK,GAAI,CAAC;IACf,IAAI,CAACD,KAAK,CAAC,CAAC;IACZ,IAAI,CAACE,KAAK,CAACJ,IAAI,CAACsB,IAAI,EAAEtB,IAAI,CAAC;EAC7B;AACF"} \ 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 index 484ff54c..737d33c6 100644 --- a/node_modules/@babel/generator/lib/generators/template-literals.js +++ b/node_modules/@babel/generator/lib/generators/template-literals.js @@ -6,34 +6,25 @@ Object.defineProperty(exports, "__esModule", { exports.TaggedTemplateExpression = TaggedTemplateExpression; exports.TemplateElement = TemplateElement; exports.TemplateLiteral = TemplateLiteral; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - 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); + this.token(value, true); } - 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 +} + +//# sourceMappingURL=template-literals.js.map diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js.map b/node_modules/@babel/generator/lib/generators/template-literals.js.map new file mode 100644 index 00000000..a056f871 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/template-literals.js.map @@ -0,0 +1 @@ +{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","parent","isFirst","quasis","isLast","length","value","raw","token","TemplateLiteral","i","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n this: Printer,\n node: t.TaggedTemplateExpression,\n) {\n this.print(node.tag, node);\n this.print(node.typeParameters, node); // TS\n this.print(node.quasi, node);\n}\n\nexport function TemplateElement(\n this: Printer,\n node: t.TemplateElement,\n parent: t.TemplateLiteral,\n) {\n const isFirst = parent.quasis[0] === node;\n const isLast = parent.quasis[parent.quasis.length - 1] === node;\n\n const value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n\n this.token(value, true);\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n const quasis = node.quasis;\n\n for (let i = 0; i < quasis.length; i++) {\n this.print(quasis[i], node);\n\n if (i + 1 < quasis.length) {\n this.print(node.expressions[i], node);\n }\n }\n}\n"],"mappings":";;;;;;;;AAGO,SAASA,wBAAwBA,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,EAAEF,IAAI,CAAC;EAC1B,IAAI,CAACC,KAAK,CAACD,IAAI,CAACG,cAAc,EAAEH,IAAI,CAAC;EACrC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACI,KAAK,EAAEJ,IAAI,CAAC;AAC9B;AAEO,SAASK,eAAeA,CAE7BL,IAAuB,EACvBM,MAAyB,EACzB;EACA,MAAMC,OAAO,GAAGD,MAAM,CAACE,MAAM,CAAC,CAAC,CAAC,KAAKR,IAAI;EACzC,MAAMS,MAAM,GAAGH,MAAM,CAACE,MAAM,CAACF,MAAM,CAACE,MAAM,CAACE,MAAM,GAAG,CAAC,CAAC,KAAKV,IAAI;EAE/D,MAAMW,KAAK,GAAG,CAACJ,OAAO,GAAG,GAAG,GAAG,GAAG,IAAIP,IAAI,CAACW,KAAK,CAACC,GAAG,IAAIH,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;EAE5E,IAAI,CAACI,KAAK,CAACF,KAAK,EAAE,IAAI,CAAC;AACzB;AAEO,SAASG,eAAeA,CAAgBd,IAAuB,EAAE;EACtE,MAAMQ,MAAM,GAAGR,IAAI,CAACQ,MAAM;EAE1B,KAAK,IAAIO,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAEK,CAAC,EAAE,EAAE;IACtC,IAAI,CAACd,KAAK,CAACO,MAAM,CAACO,CAAC,CAAC,EAAEf,IAAI,CAAC;IAE3B,IAAIe,CAAC,GAAG,CAAC,GAAGP,MAAM,CAACE,MAAM,EAAE;MACzB,IAAI,CAACT,KAAK,CAACD,IAAI,CAACgB,WAAW,CAACD,CAAC,CAAC,EAAEf,IAAI,CAAC;IACvC;EACF;AACF"} \ 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 index ef3054b8..e02aa981 100644 --- a/node_modules/@babel/generator/lib/generators/types.js +++ b/node_modules/@babel/generator/lib/generators/types.js @@ -3,56 +3,47 @@ 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.RecordExpression = RecordExpression; -exports.TupleExpression = TupleExpression; -exports.RegExpLiteral = RegExpLiteral; +exports.BigIntLiteral = BigIntLiteral; exports.BooleanLiteral = BooleanLiteral; +exports.DecimalLiteral = DecimalLiteral; +exports.Identifier = Identifier; exports.NullLiteral = NullLiteral; exports.NumericLiteral = NumericLiteral; -exports.StringLiteral = StringLiteral; -exports.BigIntLiteral = BigIntLiteral; -exports.DecimalLiteral = DecimalLiteral; -exports.PipelineTopicExpression = PipelineTopicExpression; +exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; +exports.ObjectMethod = ObjectMethod; +exports.ObjectProperty = ObjectProperty; exports.PipelineBareFunction = PipelineBareFunction; exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; - -var t = _interopRequireWildcard(require("@babel/types")); - -var _jsesc = _interopRequireDefault(require("jsesc")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.PipelineTopicExpression = PipelineTopicExpression; +exports.RecordExpression = RecordExpression; +exports.RegExpLiteral = RegExpLiteral; +exports.SpreadElement = exports.RestElement = RestElement; +exports.StringLiteral = StringLiteral; +exports.TopicReference = TopicReference; +exports.TupleExpression = TupleExpression; +var _t = require("@babel/types"); +var _jsesc = require("jsesc"); +const { + isAssignmentPattern, + isIdentifier +} = _t; function Identifier(node) { - this.exactSource(node.loc, () => { - this.word(node.name); - }); + var _node$loc; + this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name); + this.word(node.name); } - function ArgumentPlaceholder() { - this.token("?"); + this.tokenChar(63); } - function RestElement(node) { this.token("..."); this.print(node.argument, node); } - function ObjectExpression(node) { const props = node.properties; - this.token("{"); - this.printInnerComments(node); - + this.tokenChar(123); if (props.length) { this.space(); this.printList(props, node, { @@ -61,83 +52,65 @@ function ObjectExpression(node) { }); this.space(); } - - this.token("}"); + this.sourceWithOffset("end", node.loc, 0, -1); + this.tokenChar(125); } - 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.tokenChar(91); this.print(node.key, node); - this.token("]"); + this.tokenChar(93); } else { - if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) { + if (isAssignmentPattern(node.value) && 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) { + if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) { return; } } - - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.value, node); } - function ArrayExpression(node) { const elems = node.elements; const len = elems.length; - this.token("["); - this.printInnerComments(node); - + this.tokenChar(91); 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(","); + if (i < len - 1) this.tokenChar(44); } else { - this.token(","); + this.tokenChar(44); } } - - this.token("]"); + this.tokenChar(93); } - function RecordExpression(node) { const props = node.properties; let startToken; let endToken; - if (this.format.recordAndTupleSyntaxType === "bar") { startToken = "{|"; endToken = "|}"; - } else if (this.format.recordAndTupleSyntaxType === "hash") { + } else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) { + throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`); + } else { startToken = "#{"; endToken = "}"; - } else { - throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`); } - this.token(startToken); - this.printInnerComments(node); - if (props.length) { this.space(); this.printList(props, node, { @@ -146,16 +119,13 @@ function RecordExpression(node) { }); this.space(); } - this.token(endToken); } - function TupleExpression(node) { const elems = node.elements; const len = elems.length; let startToken; let endToken; - if (this.format.recordAndTupleSyntaxType === "bar") { startToken = "[|"; endToken = "|]"; @@ -165,42 +135,32 @@ function TupleExpression(node) { } else { throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`); } - this.token(startToken); - 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(","); + if (i < len - 1) this.tokenChar(44); } } - this.token(endToken); } - 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 opts = this.format.jsescOption; const value = node.value + ""; - if (opts.numbers) { - this.number((0, _jsesc.default)(node.value, opts)); + this.number(_jsesc(node.value, opts)); } else if (raw == null) { this.number(value); } else if (this.format.minified) { @@ -209,51 +169,52 @@ function NumericLiteral(node) { this.number(raw); } } - function StringLiteral(node) { const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { + if (!this.format.minified && raw !== undefined) { this.token(raw); return; } - - const val = (0, _jsesc.default)(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && { - json: true - })); - return this.token(val); + const val = _jsesc(node.value, this.format.jsescOption); + this.token(val); } - function BigIntLiteral(node) { const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { + if (!this.format.minified && raw !== undefined) { this.word(raw); return; } - this.word(node.value + "n"); } - function DecimalLiteral(node) { const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { + if (!this.format.minified && raw !== undefined) { this.word(raw); return; } - this.word(node.value + "m"); } - +const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]); +function TopicReference() { + const { + topicToken + } = this.format; + if (validTopicTokenSet.has(topicToken)) { + this.token(topicToken); + } else { + const givenTopicTokenJSON = JSON.stringify(topicToken); + const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v)); + throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`); + } +} 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 + this.tokenChar(35); +} + +//# sourceMappingURL=types.js.map diff --git a/node_modules/@babel/generator/lib/generators/types.js.map b/node_modules/@babel/generator/lib/generators/types.js.map new file mode 100644 index 00000000..73502936 --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/types.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","_jsesc","isAssignmentPattern","isIdentifier","Identifier","node","_node$loc","sourceIdentifierName","loc","identifierName","name","word","ArgumentPlaceholder","token","RestElement","print","argument","ObjectExpression","props","properties","length","space","printList","indent","statement","sourceWithOffset","ObjectMethod","printJoin","decorators","_methodHead","body","ObjectProperty","computed","key","value","left","shorthand","ArrayExpression","elems","elements","len","i","elem","RecordExpression","startToken","endToken","format","recordAndTupleSyntaxType","Error","JSON","stringify","TupleExpression","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","jsescOption","numbers","number","jsesc","minified","StringLiteral","undefined","val","BigIntLiteral","DecimalLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","validTopics","Array","from","v","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n this.sourceIdentifierName(\n // @ts-expect-error Undocumented property identifierName\n node.loc?.identifierName || node.name,\n );\n this.word(node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument, node);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n\n this.token(\"}\");\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators, node);\n this._methodHead(node);\n this.space();\n this.print(node.body, node);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key, node);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value, node);\n return;\n }\n\n this.print(node.key, node);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value, node);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.token(\",\");\n }\n }\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, node, { indent: true, statement: true });\n this.space();\n }\n this.token(endToken);\n}\n\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, node);\n if (i < len - 1) this.token(\",\");\n }\n }\n\n this.token(endToken);\n}\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value + \"\";\n if (opts.numbers) {\n this.number(jsesc(node.value, opts));\n } else if (raw == null) {\n this.number(value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < value.length ? raw : value);\n } else {\n this.number(raw);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\nexport function DecimalLiteral(this: Printer, node: t.DecimalLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\"^^\", \"@@\", \"^\", \"%\", \"#\"]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression, node);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee, node);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAA0B;EAFjBE,mBAAmB;EAAEC;AAAY,IAAAJ,EAAA;AAInC,SAASK,UAAUA,CAAgBC,IAAkB,EAAE;EAAA,IAAAC,SAAA;EAC5D,IAAI,CAACC,oBAAoB,CAEvB,EAAAD,SAAA,GAAAD,IAAI,CAACG,GAAG,qBAARF,SAAA,CAAUG,cAAc,KAAIJ,IAAI,CAACK,IACnC,CAAC;EACD,IAAI,CAACC,IAAI,CAACN,IAAI,CAACK,IAAI,CAAC;AACtB;AAEO,SAASE,mBAAmBA,CAAA,EAAgB;EACjD,IAAI,CAACC,SAAK,GAAI,CAAC;AACjB;AAEO,SAASC,WAAWA,CAAgBT,IAAmB,EAAE;EAC9D,IAAI,CAACQ,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACE,KAAK,CAACV,IAAI,CAACW,QAAQ,EAAEX,IAAI,CAAC;AACjC;AAIO,SAASY,gBAAgBA,CAAgBZ,IAAwB,EAAE;EACxE,MAAMa,KAAK,GAAGb,IAAI,CAACc,UAAU;EAE7B,IAAI,CAACN,SAAK,IAAI,CAAC;EAEf,IAAIK,KAAK,CAACE,MAAM,EAAE;IAChB,IAAI,CAACC,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,SAAS,CAACJ,KAAK,EAAEb,IAAI,EAAE;MAAEkB,MAAM,EAAE,IAAI;MAAE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IACd;EACF;EACA,IAAI,CAAC/C,IAAI,CAACN,IAAI,CAAC6B,KAAK,GAAG,GAAG,CAAC;AAC7B;AAGA,MAAMqC,kBAAkB,GAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,SAASC,cAAcA,CAAA,EAAgB;EAC5C,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAI,CAAC5B,MAAM;EAElC,IAAIyB,kBAAkB,CAACI,GAAG,CAACD,UAAU,CAAC,EAAE;IACtC,IAAI,CAAC7D,KAAK,CAAC6D,UAAU,CAAC;EACxB,CAAC,MAAM;IACL,MAAME,mBAAmB,GAAG3B,IAAI,CAACC,SAAS,CAACwB,UAAU,CAAC;IACtD,MAAMG,WAAW,GAAGC,KAAK,CAACC,IAAI,CAACR,kBAAkB,EAAES,CAAC,IAAI/B,IAAI,CAACC,SAAS,CAAC8B,CAAC,CAAC,CAAC;IAC1E,MAAM,IAAIhC,KAAK,CACZ,mDAAkD,GAChD,GAAE6B,WAAW,CAACI,IAAI,CAAC,IAAI,CAAE,KAAIL,mBAAoB,qBACtD,CAAC;EACH;AACF;AAGO,SAASM,uBAAuBA,CAErC7E,IAA+B,EAC/B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAAC8E,UAAU,EAAE9E,IAAI,CAAC;AACnC;AAEO,SAAS+E,oBAAoBA,CAElC/E,IAA4B,EAC5B;EACA,IAAI,CAACU,KAAK,CAACV,IAAI,CAACgF,MAAM,EAAEhF,IAAI,CAAC;AAC/B;AAEO,SAASiF,6BAA6BA,CAAA,EAAgB;EAC3D,IAAI,CAACzE,SAAK,GAAI,CAAC;AACjB"} \ 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 index 43fc3f0b..9d621d23 100644 --- a/node_modules/@babel/generator/lib/generators/typescript.js +++ b/node_modules/@babel/generator/lib/generators/typescript.js @@ -3,328 +3,290 @@ 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.TSAnyKeyword = TSAnyKeyword; +exports.TSArrayType = TSArrayType; +exports.TSSatisfiesExpression = exports.TSAsExpression = TSTypeExpression; +exports.TSBigIntKeyword = TSBigIntKeyword; +exports.TSBooleanKeyword = TSBooleanKeyword; exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; +exports.TSConditionalType = TSConditionalType; exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.TSPropertySignature = TSPropertySignature; -exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; -exports.TSMethodSignature = TSMethodSignature; +exports.TSConstructorType = TSConstructorType; +exports.TSDeclareFunction = TSDeclareFunction; +exports.TSDeclareMethod = TSDeclareMethod; +exports.TSEnumDeclaration = TSEnumDeclaration; +exports.TSEnumMember = TSEnumMember; +exports.TSExportAssignment = TSExportAssignment; +exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; +exports.TSExternalModuleReference = TSExternalModuleReference; +exports.TSFunctionType = TSFunctionType; +exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; +exports.TSImportType = TSImportType; exports.TSIndexSignature = TSIndexSignature; -exports.TSAnyKeyword = TSAnyKeyword; -exports.TSBigIntKeyword = TSBigIntKeyword; -exports.TSUnknownKeyword = TSUnknownKeyword; +exports.TSIndexedAccessType = TSIndexedAccessType; +exports.TSInferType = TSInferType; +exports.TSInstantiationExpression = TSInstantiationExpression; +exports.TSInterfaceBody = TSInterfaceBody; +exports.TSInterfaceDeclaration = TSInterfaceDeclaration; +exports.TSIntersectionType = TSIntersectionType; +exports.TSIntrinsicKeyword = TSIntrinsicKeyword; +exports.TSLiteralType = TSLiteralType; +exports.TSMappedType = TSMappedType; +exports.TSMethodSignature = TSMethodSignature; +exports.TSModuleBlock = TSModuleBlock; +exports.TSModuleDeclaration = TSModuleDeclaration; +exports.TSNamedTupleMember = TSNamedTupleMember; +exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; +exports.TSNeverKeyword = TSNeverKeyword; +exports.TSNonNullExpression = TSNonNullExpression; +exports.TSNullKeyword = TSNullKeyword; exports.TSNumberKeyword = TSNumberKeyword; exports.TSObjectKeyword = TSObjectKeyword; -exports.TSBooleanKeyword = TSBooleanKeyword; +exports.TSOptionalType = TSOptionalType; +exports.TSParameterProperty = TSParameterProperty; +exports.TSParenthesizedType = TSParenthesizedType; +exports.TSPropertySignature = TSPropertySignature; +exports.TSQualifiedName = TSQualifiedName; +exports.TSRestType = TSRestType; exports.TSStringKeyword = TSStringKeyword; exports.TSSymbolKeyword = TSSymbolKeyword; -exports.TSVoidKeyword = TSVoidKeyword; -exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.TSNullKeyword = TSNullKeyword; -exports.TSNeverKeyword = TSNeverKeyword; -exports.TSIntrinsicKeyword = TSIntrinsicKeyword; 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.TSNamedTupleMember = TSNamedTupleMember; -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.TSTypeAnnotation = TSTypeAnnotation; 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; +exports.TSTypeLiteral = TSTypeLiteral; +exports.TSTypeOperator = TSTypeOperator; +exports.TSTypeParameter = TSTypeParameter; +exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; +exports.TSTypePredicate = TSTypePredicate; +exports.TSTypeQuery = TSTypeQuery; +exports.TSTypeReference = TSTypeReference; +exports.TSUndefinedKeyword = TSUndefinedKeyword; +exports.TSUnionType = TSUnionType; +exports.TSUnknownKeyword = TSUnknownKeyword; +exports.TSVoidKeyword = TSVoidKeyword; exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType; +exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; +exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase; +exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody; function TSTypeAnnotation(node) { - this.token(":"); + this.tokenChar(58); this.space(); - if (node.optional) this.token("?"); + if (node.optional) this.tokenChar(63); this.print(node.typeAnnotation, node); } - -function TSTypeParameterInstantiation(node) { - this.token("<"); +function TSTypeParameterInstantiation(node, parent) { + this.tokenChar(60); this.printList(node.params, node, {}); - this.token(">"); + if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) { + this.tokenChar(44); + } + this.tokenChar(62); } - function TSTypeParameter(node) { + if (node.in) { + this.word("in"); + this.space(); + } + if (node.out) { + this.word("out"); + this.space(); + } 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.tokenChar(61); 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) { +function TSDeclareFunction(node, parent) { if (node.declare) { this.word("declare"); this.space(); } - - this._functionHead(node); - - this.token(";"); + this._functionHead(node, parent); + this.tokenChar(59); } - function TSDeclareMethod(node) { this._classMethodHead(node); - - this.token(";"); + this.tokenChar(59); } - function TSQualifiedName(node) { this.print(node.left, node); - this.token("."); + this.tokenChar(46); this.print(node.right, node); } - function TSCallSignatureDeclaration(node) { this.tsPrintSignatureDeclarationBase(node); - this.token(";"); + this.tokenChar(59); } - function TSConstructSignatureDeclaration(node) { this.word("new"); this.space(); this.tsPrintSignatureDeclarationBase(node); - this.token(";"); + this.tokenChar(59); } - 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.tokenChar(61); this.space(); this.print(initializer, node); } - - this.token(";"); + this.tokenChar(59); } - function tsPrintPropertyOrMethodName(node) { if (node.computed) { - this.token("["); + this.tokenChar(91); } - this.print(node.key, node); - if (node.computed) { - this.token("]"); + this.tokenChar(93); } - if (node.optional) { - this.token("?"); + this.tokenChar(63); } } - function TSMethodSignature(node) { + const { + kind + } = node; + if (kind === "set" || kind === "get") { + this.word(kind); + this.space(); + } this.tsPrintPropertyOrMethodName(node); this.tsPrintSignatureDeclarationBase(node); - this.token(";"); + this.tokenChar(59); } - function TSIndexSignature(node) { const { - readonly + readonly, + static: isStatic } = node; - + if (isStatic) { + this.word("static"); + this.space(); + } if (readonly) { this.word("readonly"); this.space(); } - - this.token("["); - + this.tokenChar(91); this._parameters(node.parameters, node); - - this.token("]"); + this.tokenChar(93); this.print(node.typeAnnotation, node); - this.token(";"); + this.tokenChar(59); } - function TSAnyKeyword() { this.word("any"); } - function TSBigIntKeyword() { this.word("bigint"); } - 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 TSIntrinsicKeyword() { this.word("intrinsic"); } - function TSThisType() { this.word("this"); } - function TSFunctionType(node) { this.tsPrintFunctionOrConstructorType(node); } - function TSConstructorType(node) { if (node.abstract) { this.word("abstract"); this.space(); } - this.word("new"); this.space(); this.tsPrintFunctionOrConstructorType(node); } - function tsPrintFunctionOrConstructorType(node) { const { - typeParameters, - parameters + typeParameters } = node; + const parameters = node.parameters; this.print(typeParameters, node); - this.token("("); - + this.tokenChar(40); this._parameters(parameters, node); - - this.token(")"); + this.tokenChar(41); this.space(); this.token("=>"); this.space(); - this.print(node.typeAnnotation.typeAnnotation, node); + const returnType = node.typeAnnotation; + this.print(returnType.typeAnnotation, node); } - function TSTypeReference(node) { - this.print(node.typeName, node); - this.print(node.typeParameters, node); + this.print(node.typeName, node, true); + this.print(node.typeParameters, node, true); } - function TSTypePredicate(node) { if (node.asserts) { this.word("asserts"); this.space(); } - this.print(node.parameterName); - if (node.typeAnnotation) { this.space(); this.word("is"); @@ -332,88 +294,72 @@ function TSTypePredicate(node) { this.print(node.typeAnnotation.typeAnnotation); } } - function TSTypeQuery(node) { this.word("typeof"); this.space(); this.print(node.exprName); + if (node.typeParameters) { + this.print(node.typeParameters, node); + } } - function TSTypeLiteral(node) { this.tsPrintTypeLiteralOrInterfaceBody(node.members, node); } - function tsPrintTypeLiteralOrInterfaceBody(members, node) { - this.tsPrintBraced(members, node); + tsPrintBraced(this, members, node); } - -function tsPrintBraced(members, node) { - this.token("{"); - +function tsPrintBraced(printer, members, node) { + printer.token("{"); if (members.length) { - this.indent(); - this.newline(); - + printer.indent(); + printer.newline(); for (const member of members) { - this.print(member, node); - this.newline(); + printer.print(member, node); + printer.newline(); } - - this.dedent(); - this.rightBrace(); - } else { - this.token("}"); + printer.dedent(); } + printer.rightBrace(node); } - function TSArrayType(node) { - this.print(node.elementType, node); + this.print(node.elementType, node, true); this.token("[]"); } - function TSTupleType(node) { - this.token("["); + this.tokenChar(91); this.printList(node.elementTypes, node); - this.token("]"); + this.tokenChar(93); } - function TSOptionalType(node) { this.print(node.typeAnnotation, node); - this.token("?"); + this.tokenChar(63); } - function TSRestType(node) { this.token("..."); this.print(node.typeAnnotation, node); } - function TSNamedTupleMember(node) { this.print(node.label, node); - if (node.optional) this.token("?"); - this.token(":"); + if (node.optional) this.tokenChar(63); + this.tokenChar(58); this.space(); this.print(node.elementType, node); } - function TSUnionType(node) { - this.tsPrintUnionOrIntersectionType(node, "|"); + tsPrintUnionOrIntersectionType(this, node, "|"); } - function TSIntersectionType(node) { - this.tsPrintUnionOrIntersectionType(node, "&"); + tsPrintUnionOrIntersectionType(this, node, "&"); } - -function tsPrintUnionOrIntersectionType(node, sep) { - this.printJoin(node.types, node, { +function tsPrintUnionOrIntersectionType(printer, node, sep) { + printer.printJoin(node.types, node, { separator() { this.space(); this.token(sep); this.space(); } - }); } - function TSConditionalType(node) { this.print(node.checkType); this.space(); @@ -421,40 +367,35 @@ function TSConditionalType(node) { this.space(); this.print(node.extendsType); this.space(); - this.token("?"); + this.tokenChar(63); this.space(); this.print(node.trueType); this.space(); - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.falseType); } - function TSInferType(node) { this.token("infer"); this.space(); this.print(node.typeParameter); } - function TSParenthesizedType(node) { - this.token("("); + this.tokenChar(40); this.print(node.typeAnnotation, node); - this.token(")"); + this.tokenChar(41); } - function TSTypeOperator(node) { this.word(node.operator); this.space(); this.print(node.typeAnnotation, node); } - function TSIndexedAccessType(node) { - this.print(node.objectType, node); - this.token("["); + this.print(node.objectType, node, true); + this.tokenChar(91); this.print(node.indexType, node); - this.token("]"); + this.tokenChar(93); } - function TSMappedType(node) { const { nameType, @@ -462,58 +403,48 @@ function TSMappedType(node) { readonly, typeParameter } = node; - this.token("{"); + this.tokenChar(123); this.space(); - if (readonly) { tokenIfPlusMinus(this, readonly); this.word("readonly"); this.space(); } - - this.token("["); + this.tokenChar(91); this.word(typeParameter.name); this.space(); this.word("in"); this.space(); this.print(typeParameter.constraint, typeParameter); - if (nameType) { this.space(); this.word("as"); this.space(); this.print(nameType, node); } - - this.token("]"); - + this.tokenChar(93); if (optional) { tokenIfPlusMinus(this, optional); - this.token("?"); + this.tokenChar(63); } - - this.token(":"); + this.tokenChar(58); this.space(); this.print(node.typeAnnotation, node); this.space(); - this.token("}"); + this.tokenChar(125); } - 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, @@ -522,32 +453,26 @@ function TSInterfaceDeclaration(node) { 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 != null && extendz.length) { 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, @@ -555,47 +480,49 @@ function TSTypeAliasDeclaration(node) { 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.tokenChar(61); this.space(); this.print(typeAnnotation, node); - this.token(";"); + this.tokenChar(59); } - -function TSAsExpression(node) { +function TSTypeExpression(node) { + var _expression$trailingC; const { + type, expression, typeAnnotation } = node; - this.print(expression, node); + const forceParens = !!((_expression$trailingC = expression.trailingComments) != null && _expression$trailingC.length); + this.print(expression, node, true, undefined, forceParens); this.space(); - this.word("as"); + this.word(type === "TSAsExpression" ? "as" : "satisfies"); this.space(); this.print(typeAnnotation, node); } - function TSTypeAssertion(node) { const { typeAnnotation, expression } = node; - this.token("<"); + this.tokenChar(60); this.print(typeAnnotation, node); - this.token(">"); + this.tokenChar(62); this.space(); this.print(expression, node); } - +function TSInstantiationExpression(node) { + this.print(node.expression, node); + this.print(node.typeParameters, node); +} function TSEnumDeclaration(node) { const { declare, @@ -603,80 +530,64 @@ function TSEnumDeclaration(node) { 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); + tsPrintBraced(this, members, node); } - function TSEnumMember(node) { const { id, initializer } = node; this.print(id, node); - if (initializer) { this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(initializer, node); } - - this.token(","); + this.tokenChar(44); } - 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(";"); + this.tokenChar(59); return; } - let body = node.body; - while (body.type === "TSModuleDeclaration") { - this.token("."); + this.tokenChar(46); this.print(body.id, body); body = body.body; } - this.space(); this.print(body, node); } - function TSModuleBlock(node) { - this.tsPrintBraced(node.body, node); + tsPrintBraced(this, node.body, node); } - function TSImportType(node) { const { argument, @@ -684,62 +595,53 @@ function TSImportType(node) { typeParameters } = node; this.word("import"); - this.token("("); + this.tokenChar(40); this.print(argument, node); - this.token(")"); - + this.tokenChar(41); if (qualifier) { - this.token("."); + this.tokenChar(46); 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.tokenChar(61); this.space(); this.print(moduleReference, node); - this.token(";"); + this.tokenChar(59); } - function TSExternalModuleReference(node) { this.token("require("); this.print(node.expression, node); - this.token(")"); + this.tokenChar(41); } - function TSNonNullExpression(node) { this.print(node.expression, node); - this.token("!"); + this.tokenChar(33); } - function TSExportAssignment(node) { this.word("export"); this.space(); - this.token("="); + this.tokenChar(61); this.space(); this.print(node.expression, node); - this.token(";"); + this.tokenChar(59); } - function TSNamespaceExportDeclaration(node) { this.word("export"); this.space(); @@ -749,44 +651,44 @@ function TSNamespaceExportDeclaration(node) { this.space(); this.print(node.id, node); } - function tsPrintSignatureDeclarationBase(node) { const { - typeParameters, - parameters + typeParameters } = node; + const parameters = node.parameters; this.print(typeParameters, node); - this.token("("); - + this.tokenChar(40); this._parameters(parameters, node); - - this.token(")"); - this.print(node.typeAnnotation, node); + this.tokenChar(41); + const returnType = node.typeAnnotation; + this.print(returnType, node); } - -function tsPrintClassMemberModifiers(node, isField) { +function tsPrintClassMemberModifiers(node) { + const isField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty"; if (isField && node.declare) { this.word("declare"); this.space(); } - if (node.accessibility) { this.word(node.accessibility); this.space(); } - if (node.static) { this.word("static"); this.space(); } - + if (node.override) { + this.word("override"); + this.space(); + } if (node.abstract) { this.word("abstract"); this.space(); } - if (isField && node.readonly) { this.word("readonly"); this.space(); } -} \ No newline at end of file +} + +//# sourceMappingURL=typescript.js.map diff --git a/node_modules/@babel/generator/lib/generators/typescript.js.map b/node_modules/@babel/generator/lib/generators/typescript.js.map new file mode 100644 index 00000000..15eaac3c --- /dev/null +++ b/node_modules/@babel/generator/lib/generators/typescript.js.map @@ -0,0 +1 @@ +{"version":3,"names":["TSTypeAnnotation","node","token","space","optional","print","typeAnnotation","TSTypeParameterInstantiation","parent","printList","params","type","length","TSTypeParameter","in","word","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","parameter","TSDeclareFunction","declare","_functionHead","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","TSConstructSignatureDeclaration","TSPropertySignature","initializer","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","tsPrintTypeLiteralOrInterfaceBody","members","tsPrintBraced","printer","indent","newline","member","dedent","rightBrace","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","printJoin","types","separator","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","tokenIfPlusMinus","self","tok","TSLiteralType","literal","TSExpressionWithTypeArguments","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSTypeExpression","_expression$trailingC","forceParens","trailingComments","undefined","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","const","isConst","TSEnumMember","TSModuleDeclaration","global","TSModuleBlock","TSImportType","argument","qualifier","TSImportEqualsDeclaration","isExport","moduleReference","TSExternalModuleReference","TSNonNullExpression","TSExportAssignment","TSNamespaceExportDeclaration","tsPrintClassMemberModifiers","isField","override"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport function TSTypeAnnotation(this: Printer, node: t.TSTypeAnnotation) {\n this.token(\":\");\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n this.printList(node.params, node, {});\n if (parent.type === \"ArrowFunctionExpression\" && node.params.length === 1) {\n this.token(\",\");\n }\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (node.name as unknown as string)\n : (node.name as unknown as t.Identifier).name,\n );\n\n if (node.constraint) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.constraint, node);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default, node);\n }\n}\n\nexport function TSParameterProperty(\n this: Printer,\n node: t.TSParameterProperty,\n) {\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n\n if (node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n\n this._param(node.parameter);\n}\n\nexport function TSDeclareFunction(\n this: Printer,\n node: t.TSDeclareFunction,\n parent: NodePath[\"parent\"],\n) {\n if (node.declare) {\n this.word(\"declare\");\n this.space();\n }\n this._functionHead(node, parent);\n this.token(\";\");\n}\n\nexport function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) {\n this._classMethodHead(node);\n this.token(\";\");\n}\n\nexport function TSQualifiedName(this: Printer, node: t.TSQualifiedName) {\n this.print(node.left, node);\n this.token(\".\");\n this.print(node.right, node);\n}\n\nexport function TSCallSignatureDeclaration(\n this: Printer,\n node: t.TSCallSignatureDeclaration,\n) {\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSConstructSignatureDeclaration(\n this: Printer,\n node: t.TSConstructSignatureDeclaration,\n) {\n this.word(\"new\");\n this.space();\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSPropertySignature(\n this: Printer,\n node: t.TSPropertySignature,\n) {\n const { readonly, initializer } = node;\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.print(node.typeAnnotation, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\";\");\n}\n\nexport function tsPrintPropertyOrMethodName(\n this: Printer,\n node: t.TSPropertySignature | t.TSMethodSignature,\n) {\n if (node.computed) {\n this.token(\"[\");\n }\n this.print(node.key, node);\n if (node.computed) {\n this.token(\"]\");\n }\n if (node.optional) {\n this.token(\"?\");\n }\n}\n\nexport function TSMethodSignature(this: Printer, node: t.TSMethodSignature) {\n const { kind } = node;\n if (kind === \"set\" || kind === \"get\") {\n this.word(kind);\n this.space();\n }\n this.tsPrintPropertyOrMethodName(node);\n this.tsPrintSignatureDeclarationBase(node);\n this.token(\";\");\n}\n\nexport function TSIndexSignature(this: Printer, node: t.TSIndexSignature) {\n const { readonly, static: isStatic } = node;\n if (isStatic) {\n this.word(\"static\");\n this.space();\n }\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.token(\"[\");\n this._parameters(node.parameters, node);\n this.token(\"]\");\n this.print(node.typeAnnotation, node);\n this.token(\";\");\n}\n\nexport function TSAnyKeyword(this: Printer) {\n this.word(\"any\");\n}\nexport function TSBigIntKeyword(this: Printer) {\n this.word(\"bigint\");\n}\nexport function TSUnknownKeyword(this: Printer) {\n this.word(\"unknown\");\n}\nexport function TSNumberKeyword(this: Printer) {\n this.word(\"number\");\n}\nexport function TSObjectKeyword(this: Printer) {\n this.word(\"object\");\n}\nexport function TSBooleanKeyword(this: Printer) {\n this.word(\"boolean\");\n}\nexport function TSStringKeyword(this: Printer) {\n this.word(\"string\");\n}\nexport function TSSymbolKeyword(this: Printer) {\n this.word(\"symbol\");\n}\nexport function TSVoidKeyword(this: Printer) {\n this.word(\"void\");\n}\nexport function TSUndefinedKeyword(this: Printer) {\n this.word(\"undefined\");\n}\nexport function TSNullKeyword(this: Printer) {\n this.word(\"null\");\n}\nexport function TSNeverKeyword(this: Printer) {\n this.word(\"never\");\n}\nexport function TSIntrinsicKeyword(this: Printer) {\n this.word(\"intrinsic\");\n}\n\nexport function TSThisType(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TSFunctionType(this: Printer, node: t.TSFunctionType) {\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function TSConstructorType(this: Printer, node: t.TSConstructorType) {\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n this.word(\"new\");\n this.space();\n this.tsPrintFunctionOrConstructorType(node);\n}\n\nexport function tsPrintFunctionOrConstructorType(\n this: Printer,\n node: t.TSFunctionType | t.TSConstructorType,\n) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.params\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n this.space();\n this.token(\"=>\");\n this.space();\n const returnType = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeAnnotation;\n this.print(returnType.typeAnnotation, node);\n}\n\nexport function TSTypeReference(this: Printer, node: t.TSTypeReference) {\n this.print(node.typeName, node, true);\n this.print(node.typeParameters, node, true);\n}\n\nexport function TSTypePredicate(this: Printer, node: t.TSTypePredicate) {\n if (node.asserts) {\n this.word(\"asserts\");\n this.space();\n }\n this.print(node.parameterName);\n if (node.typeAnnotation) {\n this.space();\n this.word(\"is\");\n this.space();\n this.print(node.typeAnnotation.typeAnnotation);\n }\n}\n\nexport function TSTypeQuery(this: Printer, node: t.TSTypeQuery) {\n this.word(\"typeof\");\n this.space();\n this.print(node.exprName);\n\n if (node.typeParameters) {\n this.print(node.typeParameters, node);\n }\n}\n\nexport function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);\n}\n\nexport function tsPrintTypeLiteralOrInterfaceBody(\n this: Printer,\n members: t.TSTypeElement[],\n node: t.TSType | t.TSInterfaceBody,\n) {\n tsPrintBraced(this, members, node);\n}\n\nfunction tsPrintBraced(printer: Printer, members: t.Node[], node: t.Node) {\n printer.token(\"{\");\n if (members.length) {\n printer.indent();\n printer.newline();\n for (const member of members) {\n printer.print(member, node);\n //this.token(sep);\n printer.newline();\n }\n printer.dedent();\n }\n\n printer.rightBrace(node);\n}\n\nexport function TSArrayType(this: Printer, node: t.TSArrayType) {\n this.print(node.elementType, node, true);\n\n this.token(\"[]\");\n}\n\nexport function TSTupleType(this: Printer, node: t.TSTupleType) {\n this.token(\"[\");\n this.printList(node.elementTypes, node);\n this.token(\"]\");\n}\n\nexport function TSOptionalType(this: Printer, node: t.TSOptionalType) {\n this.print(node.typeAnnotation, node);\n this.token(\"?\");\n}\n\nexport function TSRestType(this: Printer, node: t.TSRestType) {\n this.token(\"...\");\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSNamedTupleMember(this: Printer, node: t.TSNamedTupleMember) {\n this.print(node.label, node);\n if (node.optional) this.token(\"?\");\n this.token(\":\");\n this.space();\n this.print(node.elementType, node);\n}\n\nexport function TSUnionType(this: Printer, node: t.TSUnionType) {\n tsPrintUnionOrIntersectionType(this, node, \"|\");\n}\n\nexport function TSIntersectionType(this: Printer, node: t.TSIntersectionType) {\n tsPrintUnionOrIntersectionType(this, node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(\n printer: Printer,\n node: t.TSUnionType | t.TSIntersectionType,\n sep: \"|\" | \"&\",\n) {\n printer.printJoin(node.types, node, {\n separator() {\n this.space();\n this.token(sep);\n this.space();\n },\n });\n}\n\nexport function TSConditionalType(this: Printer, node: t.TSConditionalType) {\n this.print(node.checkType);\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.extendsType);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.trueType);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.falseType);\n}\n\nexport function TSInferType(this: Printer, node: t.TSInferType) {\n this.token(\"infer\");\n this.space();\n this.print(node.typeParameter);\n}\n\nexport function TSParenthesizedType(\n this: Printer,\n node: t.TSParenthesizedType,\n) {\n this.token(\"(\");\n this.print(node.typeAnnotation, node);\n this.token(\")\");\n}\n\nexport function TSTypeOperator(this: Printer, node: t.TSTypeOperator) {\n this.word(node.operator);\n this.space();\n this.print(node.typeAnnotation, node);\n}\n\nexport function TSIndexedAccessType(\n this: Printer,\n node: t.TSIndexedAccessType,\n) {\n this.print(node.objectType, node, true);\n this.token(\"[\");\n this.print(node.indexType, node);\n this.token(\"]\");\n}\n\nexport function TSMappedType(this: Printer, node: t.TSMappedType) {\n const { nameType, optional, readonly, typeParameter } = node;\n this.token(\"{\");\n this.space();\n if (readonly) {\n tokenIfPlusMinus(this, readonly);\n this.word(\"readonly\");\n this.space();\n }\n\n this.token(\"[\");\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (typeParameter.name as unknown as string)\n : (typeParameter.name as unknown as t.Identifier).name,\n );\n this.space();\n this.word(\"in\");\n this.space();\n this.print(typeParameter.constraint, typeParameter);\n\n if (nameType) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(nameType, node);\n }\n\n this.token(\"]\");\n\n if (optional) {\n tokenIfPlusMinus(this, optional);\n this.token(\"?\");\n }\n this.token(\":\");\n this.space();\n this.print(node.typeAnnotation, node);\n this.space();\n this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self: Printer, tok: true | \"+\" | \"-\") {\n if (tok !== true) {\n self.token(tok);\n }\n}\n\nexport function TSLiteralType(this: Printer, node: t.TSLiteralType) {\n this.print(node.literal, node);\n}\n\nexport function TSExpressionWithTypeArguments(\n this: Printer,\n node: t.TSExpressionWithTypeArguments,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSInterfaceDeclaration(\n this: Printer,\n node: t.TSInterfaceDeclaration,\n) {\n const { declare, id, typeParameters, extends: extendz, body } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"interface\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n if (extendz?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(extendz, node);\n }\n this.space();\n this.print(body, node);\n}\n\nexport function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) {\n this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);\n}\n\nexport function TSTypeAliasDeclaration(\n this: Printer,\n node: t.TSTypeAliasDeclaration,\n) {\n const { declare, id, typeParameters, typeAnnotation } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"type\");\n this.space();\n this.print(id, node);\n this.print(typeParameters, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(typeAnnotation, node);\n this.token(\";\");\n}\n\nfunction TSTypeExpression(\n this: Printer,\n node: t.TSAsExpression | t.TSSatisfiesExpression,\n) {\n const { type, expression, typeAnnotation } = node;\n const forceParens = !!expression.trailingComments?.length;\n this.print(expression, node, true, undefined, forceParens);\n this.space();\n this.word(type === \"TSAsExpression\" ? \"as\" : \"satisfies\");\n this.space();\n this.print(typeAnnotation, node);\n}\n\nexport {\n TSTypeExpression as TSAsExpression,\n TSTypeExpression as TSSatisfiesExpression,\n};\n\nexport function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) {\n const { typeAnnotation, expression } = node;\n this.token(\"<\");\n this.print(typeAnnotation, node);\n this.token(\">\");\n this.space();\n this.print(expression, node);\n}\n\nexport function TSInstantiationExpression(\n this: Printer,\n node: t.TSInstantiationExpression,\n) {\n this.print(node.expression, node);\n this.print(node.typeParameters, node);\n}\n\nexport function TSEnumDeclaration(this: Printer, node: t.TSEnumDeclaration) {\n const { declare, const: isConst, id, members } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n if (isConst) {\n this.word(\"const\");\n this.space();\n }\n this.word(\"enum\");\n this.space();\n this.print(id, node);\n this.space();\n tsPrintBraced(this, members, node);\n}\n\nexport function TSEnumMember(this: Printer, node: t.TSEnumMember) {\n const { id, initializer } = node;\n this.print(id, node);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer, node);\n }\n this.token(\",\");\n}\n\nexport function TSModuleDeclaration(\n this: Printer,\n node: t.TSModuleDeclaration,\n) {\n const { declare, id } = node;\n\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n\n if (!node.global) {\n this.word(id.type === \"Identifier\" ? \"namespace\" : \"module\");\n this.space();\n }\n this.print(id, node);\n\n if (!node.body) {\n this.token(\";\");\n return;\n }\n\n let body = node.body;\n while (body.type === \"TSModuleDeclaration\") {\n this.token(\".\");\n this.print(body.id, body);\n body = body.body;\n }\n\n this.space();\n this.print(body, node);\n}\n\nexport function TSModuleBlock(this: Printer, node: t.TSModuleBlock) {\n tsPrintBraced(this, node.body, node);\n}\n\nexport function TSImportType(this: Printer, node: t.TSImportType) {\n const { argument, qualifier, typeParameters } = node;\n this.word(\"import\");\n this.token(\"(\");\n this.print(argument, node);\n this.token(\")\");\n if (qualifier) {\n this.token(\".\");\n this.print(qualifier, node);\n }\n if (typeParameters) {\n this.print(typeParameters, node);\n }\n}\n\nexport function TSImportEqualsDeclaration(\n this: Printer,\n node: t.TSImportEqualsDeclaration,\n) {\n const { isExport, id, moduleReference } = node;\n if (isExport) {\n this.word(\"export\");\n this.space();\n }\n this.word(\"import\");\n this.space();\n this.print(id, node);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(moduleReference, node);\n this.token(\";\");\n}\n\nexport function TSExternalModuleReference(\n this: Printer,\n node: t.TSExternalModuleReference,\n) {\n this.token(\"require(\");\n this.print(node.expression, node);\n this.token(\")\");\n}\n\nexport function TSNonNullExpression(\n this: Printer,\n node: t.TSNonNullExpression,\n) {\n this.print(node.expression, node);\n this.token(\"!\");\n}\n\nexport function TSExportAssignment(this: Printer, node: t.TSExportAssignment) {\n this.word(\"export\");\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.expression, node);\n this.token(\";\");\n}\n\nexport function TSNamespaceExportDeclaration(\n this: Printer,\n node: t.TSNamespaceExportDeclaration,\n) {\n this.word(\"export\");\n this.space();\n this.word(\"as\");\n this.space();\n this.word(\"namespace\");\n this.space();\n this.print(node.id, node);\n}\n\nexport function tsPrintSignatureDeclarationBase(this: Printer, node: any) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? node.params\n : node.parameters;\n this.print(typeParameters, node);\n this.token(\"(\");\n this._parameters(parameters, node);\n this.token(\")\");\n const returnType = process.env.BABEL_8_BREAKING\n ? node.returnType\n : node.typeAnnotation;\n this.print(returnType, node);\n}\n\nexport function tsPrintClassMemberModifiers(\n this: Printer,\n node:\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.TSDeclareMethod,\n) {\n const isField =\n node.type === \"ClassAccessorProperty\" || node.type === \"ClassProperty\";\n if (isField && node.declare) {\n this.word(\"declare\");\n this.space();\n }\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.override) {\n this.word(\"override\");\n this.space();\n }\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n if (isField && node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAASA,gBAAgBA,CAAgBC,IAAwB,EAAE;EACxE,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAAC,CAAC;EAEZ,IAAIF,IAAI,CAACG,QAAQ,EAAE,IAAI,CAACF,SAAK,GAAI,CAAC;EAClC,IAAI,CAACG,K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;IACnB,IAAI,CAACZ,KAAK,CAAC,CAAC;EACd;EACA,IAAIF,IAAI,CAAC0J,QAAQ,EAAE;IACjB,IAAI,CAAC5I,IAAI,CAAC,UAAU,CAAC;IACrB,IAAI,CAACZ,KAAK,CAAC,CAAC;EACd;EACA,IAAIF,IAAI,CAACgE,QAAQ,EAAE;IACjB,IAAI,CAAClD,IAAI,CAAC,UAAU,CAAC;IACrB,IAAI,CAACZ,KAAK,CAAC,CAAC;EACd;EACA,IAAIuJ,OAAO,IAAIzJ,IAAI,CAACqB,QAAQ,EAAE;IAC5B,IAAI,CAACP,IAAI,CAAC,UAAU,CAAC;IACrB,IAAI,CAACZ,KAAK,CAAC,CAAC;EACd;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js index 94401b90..4e682743 100644 --- a/node_modules/@babel/generator/lib/index.js +++ b/node_modules/@babel/generator/lib/index.js @@ -3,15 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = generate; 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 }; } - +exports.default = generate; +var _sourceMap = require("./source-map"); +var _printer = require("./printer"); class Generator extends _printer.default { constructor(ast, opts = {}, code) { const format = normalizeOptions(code, opts); @@ -20,13 +15,10 @@ class Generator extends _printer.default { this.ast = void 0; this.ast = ast; } - generate() { return super.generate(this.ast); } - } - function normalizeOptions(code, opts) { const format = { auxiliaryCommentBefore: opts.auxiliaryCommentBefore, @@ -40,59 +32,62 @@ function normalizeOptions(code, opts) { concise: opts.concise, indent: { adjustMultilineComment: true, - style: " ", - base: 0 + style: " " }, - decoratorsBeforeExport: !!opts.decoratorsBeforeExport, jsescOption: Object.assign({ quotes: "double", wrap: true, minimal: false }, opts.jsescOption), - recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType + recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType, + topicToken: opts.topicToken, + importAttributesKeyword: opts.importAttributesKeyword }; { - format.jsonCompatibleStrings = opts.jsonCompatibleStrings; + format.decoratorsBeforeExport = opts.decoratorsBeforeExport; + format.jsescOption.json = opts.jsonCompatibleStrings; } - 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); + format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.includes("@license") || value.includes("@preserve")); } - if (format.compact === "auto") { - format.compact = code.length > 500000; - + format.compact = typeof code === "string" && 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; } - + const { + auxiliaryCommentBefore, + auxiliaryCommentAfter, + shouldPrintComment + } = format; + if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) { + format.auxiliaryCommentBefore = undefined; + } + if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) { + format.auxiliaryCommentAfter = undefined; + } return format; } - class CodeGenerator { constructor(ast, opts, code) { this._generator = void 0; this._generator = new Generator(ast, opts, code); } - generate() { return this._generator.generate(); } - } - exports.CodeGenerator = CodeGenerator; - function generate(ast, opts, code) { const gen = new Generator(ast, opts, code); return gen.generate(); -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/index.js.map b/node_modules/@babel/generator/lib/index.js.map new file mode 100644 index 00000000..e1e94818 --- /dev/null +++ b/node_modules/@babel/generator/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_sourceMap","require","_printer","Generator","Printer","constructor","ast","opts","code","format","normalizeOptions","map","sourceMaps","SourceMap","generate","auxiliaryCommentBefore","auxiliaryCommentAfter","shouldPrintComment","retainLines","retainFunctionParens","comments","compact","minified","concise","indent","adjustMultilineComment","style","jsescOption","Object","assign","quotes","wrap","minimal","recordAndTupleSyntaxType","topicToken","importAttributesKeyword","decoratorsBeforeExport","json","jsonCompatibleStrings","value","includes","length","console","error","filename","undefined","CodeGenerator","_generator","exports","gen"],"sources":["../src/index.ts"],"sourcesContent":["import SourceMap from \"./source-map\";\nimport Printer from \"./printer\";\nimport type * as t from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\nimport type { Format } from \"./printer\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { DecodedSourceMap, Mapping } from \"@jridgewell/gen-mapping\";\n\n/**\n * Babel's code generator, turns an ast into code, maintaining sourcemaps,\n * user preferences, and valid output.\n */\n\nclass Generator extends Printer {\n constructor(\n ast: t.Node,\n opts: GeneratorOptions = {},\n code: string | { [filename: string]: string },\n ) {\n const format = normalizeOptions(code, opts);\n const map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n super(format, map);\n\n this.ast = ast;\n }\n\n ast: t.Node;\n\n /**\n * Generate code and sourcemap from ast.\n *\n * Appends comments that weren't attached to any node to the end of the generated output.\n */\n\n generate() {\n return super.generate(this.ast);\n }\n}\n\n/**\n * Normalize generator options, setting defaults.\n *\n * - Detects code indentation.\n * - If `opts.compact = \"auto\"` and the code is over 500KB, `compact` will be set to `true`.\n */\n\nfunction normalizeOptions(\n code: string | { [filename: string]: string },\n opts: GeneratorOptions,\n): Format {\n const format: Format = {\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n shouldPrintComment: opts.shouldPrintComment,\n retainLines: opts.retainLines,\n retainFunctionParens: opts.retainFunctionParens,\n comments: opts.comments == null || opts.comments,\n compact: opts.compact,\n minified: opts.minified,\n concise: opts.concise,\n indent: {\n adjustMultilineComment: true,\n style: \" \",\n },\n jsescOption: {\n quotes: \"double\",\n wrap: true,\n minimal: process.env.BABEL_8_BREAKING ? true : false,\n ...opts.jsescOption,\n },\n recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,\n topicToken: opts.topicToken,\n importAttributesKeyword: opts.importAttributesKeyword,\n };\n\n if (!process.env.BABEL_8_BREAKING) {\n format.decoratorsBeforeExport = opts.decoratorsBeforeExport;\n format.jsescOption.json = opts.jsonCompatibleStrings;\n }\n\n if (format.minified) {\n format.compact = true;\n\n format.shouldPrintComment =\n format.shouldPrintComment || (() => format.comments);\n } else {\n format.shouldPrintComment =\n format.shouldPrintComment ||\n (value =>\n format.comments ||\n value.includes(\"@license\") ||\n value.includes(\"@preserve\"));\n }\n\n if (format.compact === \"auto\") {\n format.compact = typeof code === \"string\" && code.length > 500_000; // 500KB\n\n if (format.compact) {\n console.error(\n \"[BABEL] Note: The code generator has deoptimised the styling of \" +\n `${opts.filename} as it exceeds the max of ${\"500KB\"}.`,\n );\n }\n }\n\n if (format.compact) {\n format.indent.adjustMultilineComment = false;\n }\n\n const { auxiliaryCommentBefore, auxiliaryCommentAfter, shouldPrintComment } =\n format;\n\n if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {\n format.auxiliaryCommentBefore = undefined;\n }\n if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {\n format.auxiliaryCommentAfter = undefined;\n }\n\n return format;\n}\n\nexport interface GeneratorOptions {\n /**\n * Optional string to add as a block comment at the start of the output file.\n */\n auxiliaryCommentBefore?: string;\n\n /**\n * Optional string to add as a block comment at the end of the output file.\n */\n auxiliaryCommentAfter?: string;\n\n /**\n * Function that takes a comment (as a string) and returns true if the comment should be included in the output.\n * By default, comments are included if `opts.comments` is `true` or if `opts.minified` is `false` and the comment\n * contains `@preserve` or `@license`.\n */\n shouldPrintComment?(comment: string): boolean;\n\n /**\n * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).\n * Defaults to `false`.\n */\n retainLines?: boolean;\n\n /**\n * Retain parens around function expressions (could be used to change engine parsing behavior)\n * Defaults to `false`.\n */\n retainFunctionParens?: boolean;\n\n /**\n * Should comments be included in output? Defaults to `true`.\n */\n comments?: boolean;\n\n /**\n * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.\n */\n compact?: boolean | \"auto\";\n\n /**\n * Should the output be minified. Defaults to `false`.\n */\n minified?: boolean;\n\n /**\n * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.\n */\n concise?: boolean;\n\n /**\n * Used in warning messages\n */\n filename?: string;\n\n /**\n * Enable generating source maps. Defaults to `false`.\n */\n sourceMaps?: boolean;\n\n inputSourceMap?: any;\n\n /**\n * A root for all relative URLs in the source map.\n */\n sourceRoot?: string;\n\n /**\n * The filename for the source code (i.e. the code in the `code` argument).\n * This will only be used if `code` is a string.\n */\n sourceFileName?: string;\n\n /**\n * Set to true to run jsesc with \"json\": true to print \"\\u00A9\" vs. \"©\";\n * @deprecated use `jsescOptions: { json: true }` instead\n */\n jsonCompatibleStrings?: boolean;\n\n /**\n * Set to true to enable support for experimental decorators syntax before\n * module exports. If not specified, decorators will be printed in the same\n * position as they were in the input source code.\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n\n /**\n * Options for outputting jsesc representation.\n */\n jsescOption?: jsescOptions;\n\n /**\n * For use with the recordAndTuple token.\n */\n recordAndTupleSyntaxType?: RecordAndTuplePluginOptions[\"syntaxType\"];\n\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n}\n\nexport interface GeneratorResult {\n code: string;\n map: {\n version: number;\n sources: readonly string[];\n names: readonly string[];\n sourceRoot?: string;\n sourcesContent?: readonly string[];\n mappings: string;\n file?: string;\n } | null;\n decodedMap: DecodedSourceMap | undefined;\n rawMappings: Mapping[] | undefined;\n}\n\n/**\n * We originally exported the Generator class above, but to make it extra clear that it is a private API,\n * we have moved that to an internal class instance and simplified the interface to the two public methods\n * that we wish to support.\n */\n\nexport class CodeGenerator {\n private _generator: Generator;\n constructor(ast: t.Node, opts?: GeneratorOptions, code?: string) {\n this._generator = new Generator(ast, opts, code);\n }\n generate(): GeneratorResult {\n return this._generator.generate();\n }\n}\n\n/**\n * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.\n * @param ast - the abstract syntax tree from which to generate output code.\n * @param opts - used for specifying options for code generation.\n * @param code - the original source code, used for source maps.\n * @returns - an object containing the output code and source map.\n */\nexport default function generate(\n ast: t.Node,\n opts?: GeneratorOptions,\n code?: string | { [filename: string]: string },\n) {\n const gen = new Generator(ast, opts, code);\n return gen.generate();\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAeA,MAAME,SAAS,SAASC,gBAAO,CAAC;EAC9BC,WAAWA,CACTC,GAAW,EACXC,IAAsB,GAAG,CAAC,CAAC,EAC3BC,IAA6C,EAC7C;IACA,MAAMC,MAAM,GAAGC,gBAAgB,CAACF,IAAI,EAAED,IAAI,CAAC;IAC3C,MAAMI,GAAG,GAAGJ,IAAI,CAACK,UAAU,GAAG,IAAIC,kBAAS,CAACN,IAAI,EAAEC,IAAI,CAAC,GAAG,IAAI;IAC9D,KAAK,CAACC,MAAM,EAAEE,GAAG,CAAC;IAAC,KAKrBL,GAAG;IAHD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB;EAUAQ,QAAQA,CAAA,EAAG;IACT,OAAO,KAAK,CAACA,QAAQ,CAAC,IAAI,CAACR,GAAG,CAAC;EACjC;AACF;AASA,SAASI,gBAAgBA,CACvBF,IAA6C,EAC7CD,IAAsB,EACd;EACR,MA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C,IAA8C,EAC9C;EACA,MAAMyC,GAAG,GAAG,IAAI9C,SAAS,CAACG,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAC1C,OAAOyC,GAAG,CAACnC,QAAQ,CAAC,CAAC;AACvB"} \ 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 index 1cbc55ec..43d60ee8 100644 --- a/node_modules/@babel/generator/lib/node/index.js +++ b/node_modules/@babel/generator/lib/node/index.js @@ -3,24 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.needsParens = needsParens; exports.needsWhitespace = needsWhitespace; -exports.needsWhitespaceBefore = needsWhitespaceBefore; exports.needsWhitespaceAfter = needsWhitespaceAfter; -exports.needsParens = needsParens; - -var whitespace = _interopRequireWildcard(require("./whitespace")); - -var parens = _interopRequireWildcard(require("./parentheses")); - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.needsWhitespaceBefore = needsWhitespaceBefore; +var whitespace = require("./whitespace"); +var parens = require("./parentheses"); +var _t = require("@babel/types"); +const { + FLIPPED_ALIAS_KEYS, + isCallExpression, + isExpressionStatement, + isMemberExpression, + isNewExpression +} = _t; function expandAliases(obj) { const newObj = {}; - function add(type, func) { const fn = newObj[type]; newObj[type] = fn ? function (node, parent, stack) { @@ -28,10 +26,8 @@ function expandAliases(obj) { return result == null ? func(node, parent, stack) : result; } : func; } - for (const type of Object.keys(obj)) { - const aliases = t.FLIPPED_ALIAS_KEYS[type]; - + const aliases = FLIPPED_ALIAS_KEYS[type]; if (aliases) { for (const alias of aliases) { add(alias, obj[type]); @@ -40,68 +36,43 @@ function expandAliases(obj) { 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)) { + if (isCallExpression(node)) { return true; } - - return t.isMemberExpression(node) && isOrHasCallExpression(node.object); + return isMemberExpression(node) && isOrHasCallExpression(node.object); } - function needsWhitespace(node, parent, type) { - if (!node) return 0; - - if (t.isExpressionStatement(node)) { + if (!node) return false; + if (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; + const flag = find(expandedWhitespaceNodes, node, parent); + if (typeof flag === "number") { + return (flag & type) !== 0; } - - return 0; + return false; } - function needsWhitespaceBefore(node, parent) { - return needsWhitespace(node, parent, "before"); + return needsWhitespace(node, parent, 1); } - function needsWhitespaceAfter(node, parent) { - return needsWhitespace(node, parent, "after"); + return needsWhitespace(node, parent, 2); } - function needsParens(node, parent, printStack) { if (!parent) return false; - - if (t.isNewExpression(parent) && parent.callee === node) { + if (isNewExpression(parent) && parent.callee === node) { if (isOrHasCallExpression(node)) return true; } - return find(expandedParens, node, parent, printStack); -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/node/index.js.map b/node_modules/@babel/generator/lib/node/index.js.map new file mode 100644 index 00000000..84984d56 --- /dev/null +++ b/node_modules/@babel/generator/lib/node/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["whitespace","require","parens","_t","FLIPPED_ALIAS_KEYS","isCallExpression","isExpressionStatement","isMemberExpression","isNewExpression","expandAliases","obj","newObj","add","type","func","fn","node","parent","stack","result","Object","keys","aliases","alias","expandedParens","expandedWhitespaceNodes","nodes","find","printStack","isOrHasCallExpression","object","needsWhitespace","expression","flag","needsWhitespaceBefore","needsWhitespaceAfter","needsParens","callee"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as whitespace from \"./whitespace\";\nimport * as parens from \"./parentheses\";\nimport {\n FLIPPED_ALIAS_KEYS,\n isCallExpression,\n isExpressionStatement,\n isMemberExpression,\n isNewExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport type { WhitespaceFlag } from \"./whitespace\";\n\nexport type NodeHandlers = {\n [K in string]?: (\n node: K extends t.Node[\"type\"] ? Extract : t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract\n // : t.Node,\n parent: t.Node,\n stack: t.Node[],\n ) => R;\n};\n\nfunction expandAliases(obj: NodeHandlers) {\n const newObj: NodeHandlers = {};\n\n function add(\n type: string,\n func: (node: t.Node, parent: t.Node, stack: t.Node[]) => R,\n ) {\n const fn = newObj[type];\n newObj[type] = fn\n ? function (node, parent, stack) {\n const result = fn(node, parent, stack);\n\n return result == null ? func(node, parent, stack) : result;\n }\n : func;\n }\n\n for (const type of Object.keys(obj)) {\n const aliases = FLIPPED_ALIAS_KEYS[type];\n if (aliases) {\n for (const alias of aliases) {\n add(alias, obj[type]);\n }\n } else {\n add(type, obj[type]);\n }\n }\n\n return newObj;\n}\n\n// Rather than using `t.is` on each object property, we pre-expand any type aliases\n// into concrete types so that the 'find' call below can be as fast as possible.\nconst expandedParens = expandAliases(parens);\nconst expandedWhitespaceNodes = expandAliases(whitespace.nodes);\n\nfunction find(\n obj: NodeHandlers,\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n): R | null {\n const fn = obj[node.type];\n return fn ? fn(node, parent, printStack) : null;\n}\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n if (isCallExpression(node)) {\n return true;\n }\n\n return isMemberExpression(node) && isOrHasCallExpression(node.object);\n}\n\nexport function needsWhitespace(\n node: t.Node,\n parent: t.Node,\n type: WhitespaceFlag,\n): boolean {\n if (!node) return false;\n\n if (isExpressionStatement(node)) {\n node = node.expression;\n }\n\n const flag = find(expandedWhitespaceNodes, node, parent);\n\n if (typeof flag === \"number\") {\n return (flag & type) !== 0;\n }\n\n return false;\n}\n\nexport function needsWhitespaceBefore(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 1);\n}\n\nexport function needsWhitespaceAfter(node: t.Node, parent: t.Node) {\n return needsWhitespace(node, parent, 2);\n}\n\nexport function needsParens(\n node: t.Node,\n parent: t.Node,\n printStack?: t.Node[],\n) {\n if (!parent) return false;\n\n if (isNewExpression(parent) && parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n\n return find(expandedParens, node, parent, printStack);\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AAMsB;EALpBG,kBAAkB;EAClBC,gBAAgB;EAChBC,qBAAqB;EACrBC,kBAAkB;EAClBC;AAAe,IAAAL,EAAA;AAkBjB,SAASM,aAAaA,CAAIC,GAAoB,EAAE;EAC9C,MAAMC,MAAuB,GAAG,CAAC,CAAC;EAElC,SAASC,GAAGA,CACVC,IAAY,EACZC,IAA0D,EAC1D;IACA,MAAMC,EAAE,GAAGJ,MAAM,CAACE,IAAI,CAAC;IACvBF,MAAM,CAACE,IAAI,CAAC,GAAGE,EAAE,GAC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EACZC,MAAc,EACdJ,IAAoB,EACX;EACT,IAAI,CAACG,IAAI,EAAE,OAAO,KAAK;EAEvB,IAAIV,qBAAqB,CAACU,IAAI,CAAC,EAAE;IAC/BA,IAAI,GAAGA,IAAI,CAACgB,UAAU;EACxB;EAEA,MAAMC,IAAI,GAAGN,IAAI,CAACF,uBAAuB,EAAET,IAAI,EAAEC,MAAM,CAAC;EAExD,IAAI,OAAOgB,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,CAACA,IAAI,GAAGpB,IAAI,MAAM,CAAC;EAC5B;EAEA,OAAO,KAAK;AACd;AAEO,SAASqB,qBAAqBA,CAAClB,IAAY,EAAEC,MAAc,EAAE;EAClE,OAAOc,eAAe,CAACf,IAAI,EAAEC,MAAM,EAAE,CAAC,CAAC;AACzC;AAEO,SAASkB,oBAAoBA,CAACnB,IAAY,EAAEC,MAAc,EAAE;EACjE,OAAOc,eAAe,CAACf,IAAI,EAAEC,MAAM,EAAE,CAAC,CAAC;AACzC;AAEO,SAASmB,WAAWA,CACzBpB,IAAY,EACZC,MAAc,EACdW,UAAqB,EACrB;EACA,IAAI,CAACX,MAAM,EAAE,OAAO,KAAK;EAEzB,IAAIT,eAAe,CAACS,MAAM,CAAC,IAAIA,MAAM,CAACoB,MAAM,KAAKrB,IAAI,EAAE;IACrD,IAAIa,qBAAqB,CAACb,IAAI,CAAC,EAAE,OAAO,IAAI;EAC9C;EAEA,OAAOW,IAAI,CAACH,cAAc,EAAER,IAAI,EAAEC,MAAM,EAAEW,UAAU,CAAC;AACvD"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/generator/lib/node/parentheses.js index a01727ed..4656a67c 100644 --- a/node_modules/@babel/generator/lib/node/parentheses.js +++ b/node_modules/@babel/generator/lib/node/parentheses.js @@ -3,38 +3,88 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.UpdateExpression = UpdateExpression; -exports.ObjectExpression = ObjectExpression; -exports.DoExpression = DoExpression; +exports.ArrowFunctionExpression = ArrowFunctionExpression; +exports.AssignmentExpression = AssignmentExpression; exports.Binary = Binary; -exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSIntersectionType = exports.TSUnionType = TSUnionType; -exports.TSInferType = TSInferType; exports.BinaryExpression = BinaryExpression; -exports.SequenceExpression = SequenceExpression; -exports.AwaitExpression = exports.YieldExpression = YieldExpression; exports.ClassExpression = ClassExpression; -exports.UnaryLike = UnaryLike; -exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; exports.ConditionalExpression = ConditionalExpression; -exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.AssignmentExpression = AssignmentExpression; +exports.DoExpression = DoExpression; +exports.FunctionExpression = FunctionExpression; +exports.FunctionTypeAnnotation = FunctionTypeAnnotation; +exports.Identifier = Identifier; exports.LogicalExpression = LogicalExpression; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - +exports.NullableTypeAnnotation = NullableTypeAnnotation; +exports.ObjectExpression = ObjectExpression; +exports.OptionalIndexedAccessType = OptionalIndexedAccessType; +exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression; +exports.SequenceExpression = SequenceExpression; +exports.TSTypeAssertion = exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression; +exports.TSInferType = TSInferType; +exports.TSInstantiationExpression = TSInstantiationExpression; +exports.TSIntersectionType = exports.TSUnionType = TSUnionType; +exports.UnaryLike = UnaryLike; +exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; +exports.UpdateExpression = UpdateExpression; +exports.AwaitExpression = exports.YieldExpression = YieldExpression; +var _t = require("@babel/types"); +const { + isArrayTypeAnnotation, + isArrowFunctionExpression, + isAssignmentExpression, + isAwaitExpression, + isBinary, + isBinaryExpression, + isUpdateExpression, + isCallExpression, + isClass, + isClassExpression, + isConditional, + isConditionalExpression, + isExportDeclaration, + isExportDefaultDeclaration, + isExpressionStatement, + isFor, + isForInStatement, + isForOfStatement, + isForStatement, + isFunctionExpression, + isIfStatement, + isIndexedAccessType, + isIntersectionTypeAnnotation, + isLogicalExpression, + isMemberExpression, + isNewExpression, + isNullableTypeAnnotation, + isObjectPattern, + isOptionalCallExpression, + isOptionalMemberExpression, + isReturnStatement, + isSequenceExpression, + isSwitchStatement, + isTSArrayType, + isTSAsExpression, + isTSInstantiationExpression, + isTSIntersectionType, + isTSNonNullExpression, + isTSOptionalType, + isTSRestType, + isTSTypeAssertion, + isTSUnionType, + isTaggedTemplateExpression, + isThrowStatement, + isTypeAnnotation, + isUnaryLike, + isUnionTypeAnnotation, + isVariableDeclarator, + isWhileStatement, + isYieldExpression, + isTSSatisfiesExpression +} = _t; const PRECEDENCE = { "||": 0, "??": 0, + "|>": 0, "&&": 1, "|": 2, "^": 3, @@ -59,188 +109,189 @@ const PRECEDENCE = { "%": 9, "**": 10 }; - -const isClassExtendsClause = (node, parent) => (t.isClassDeclaration(parent) || t.isClassExpression(parent)) && parent.superClass === node; - -const hasPostfixPart = (node, parent) => (t.isMemberExpression(parent) || t.isOptionalMemberExpression(parent)) && parent.object === node || (t.isCallExpression(parent) || t.isOptionalCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isTaggedTemplateExpression(parent) && parent.tag === node || t.isTSNonNullExpression(parent); - +function isTSTypeExpression(node) { + return isTSAsExpression(node) || isTSSatisfiesExpression(node) || isTSTypeAssertion(node); +} +const isClassExtendsClause = (node, parent) => isClass(parent, { + superClass: node +}); +const hasPostfixPart = (node, parent) => (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent); function NullableTypeAnnotation(node, parent) { - return t.isArrayTypeAnnotation(parent); + return isArrayTypeAnnotation(parent); } - function FunctionTypeAnnotation(node, parent, printStack) { - return t.isUnionTypeAnnotation(parent) || t.isIntersectionTypeAnnotation(parent) || t.isArrayTypeAnnotation(parent) || t.isTypeAnnotation(parent) && t.isArrowFunctionExpression(printStack[printStack.length - 3]); + if (printStack.length < 3) return; + return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]); } - function UpdateExpression(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); } - function ObjectExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerArrow: true - }); + return isFirstInContext(printStack, 1 | 2); } - function DoExpression(node, parent, printStack) { - return isFirstInStatement(printStack); + return !node.async && isFirstInContext(printStack, 1); } - function Binary(node, parent) { - if (node.operator === "**" && t.isBinaryExpression(parent, { + if (node.operator === "**" && isBinaryExpression(parent, { operator: "**" })) { return parent.left === node; } - if (isClassExtendsClause(node, parent)) { return true; } - - if (hasPostfixPart(node, parent) || t.isUnaryLike(parent) || t.isAwaitExpression(parent)) { + if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) { return true; } - - if (t.isBinary(parent)) { + if (isBinary(parent)) { 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) { + if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { return true; } } } - function UnionTypeAnnotation(node, parent) { - return t.isArrayTypeAnnotation(parent) || t.isNullableTypeAnnotation(parent) || t.isIntersectionTypeAnnotation(parent) || t.isUnionTypeAnnotation(parent); + return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent); } - -function TSAsExpression() { - return true; +function OptionalIndexedAccessType(node, parent) { + return isIndexedAccessType(parent, { + objectType: node + }); } - -function TSTypeAssertion() { +function TSAsExpression() { return true; } - function TSUnionType(node, parent) { - return t.isTSArrayType(parent) || t.isTSOptionalType(parent) || t.isTSIntersectionType(parent) || t.isTSUnionType(parent) || t.isTSRestType(parent); + return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent); } - function TSInferType(node, parent) { - return t.isTSArrayType(parent) || t.isTSOptionalType(parent); + return isTSArrayType(parent) || isTSOptionalType(parent); +} +function TSInstantiationExpression(node, parent) { + return (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters; } - function BinaryExpression(node, parent) { - return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent)); + return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent)); } - function SequenceExpression(node, parent) { - if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) { + if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) { return false; } - return true; } - function YieldExpression(node, parent) { - return t.isBinary(parent) || t.isUnaryLike(parent) || hasPostfixPart(node, parent) || t.isAwaitExpression(parent) && t.isYieldExpression(node) || t.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); + return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); } - function ClassExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); + return isFirstInContext(printStack, 1 | 4); } - function UnaryLike(node, parent) { - return hasPostfixPart(node, parent) || t.isBinaryExpression(parent, { + return hasPostfixPart(node, parent) || isBinaryExpression(parent, { operator: "**", left: node }) || isClassExtendsClause(node, parent); } - function FunctionExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); + return isFirstInContext(printStack, 1 | 4); } - function ArrowFunctionExpression(node, parent) { - return t.isExportDeclaration(parent) || ConditionalExpression(node, parent); + return isExportDeclaration(parent) || ConditionalExpression(node, parent); } - function ConditionalExpression(node, parent) { - if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { + if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, { test: node - }) || t.isAwaitExpression(parent) || t.isTSTypeAssertion(parent) || t.isTSAsExpression(parent)) { + }) || isAwaitExpression(parent) || isTSTypeExpression(parent)) { return true; } - return UnaryLike(node, parent); } - function OptionalMemberExpression(node, parent) { - return t.isCallExpression(parent, { + return isCallExpression(parent, { callee: node - }) || t.isMemberExpression(parent, { + }) || isMemberExpression(parent, { object: node }); } - function AssignmentExpression(node, parent) { - if (t.isObjectPattern(node.left)) { + if (isObjectPattern(node.left)) { return true; } else { return ConditionalExpression(node, parent); } } - function LogicalExpression(node, parent) { + if (isTSTypeExpression(parent)) return true; switch (node.operator) { case "||": - if (!t.isLogicalExpression(parent)) return false; + if (!isLogicalExpression(parent)) return false; return parent.operator === "??" || parent.operator === "&&"; - case "&&": - return t.isLogicalExpression(parent, { + return isLogicalExpression(parent, { operator: "??" }); - case "??": - return t.isLogicalExpression(parent) && parent.operator !== "??"; + return isLogicalExpression(parent) && parent.operator !== "??"; } } - -function isFirstInStatement(printStack, { - considerArrow = false, - considerDefaultExports = false -} = {}) { +function Identifier(node, parent, printStack) { + var _node$extra; + if ((_node$extra = node.extra) != null && _node$extra.parenthesized && isAssignmentExpression(parent, { + left: node + }) && (isFunctionExpression(parent.right) || isClassExpression(parent.right)) && parent.right.id == null) { + return true; + } + if (node.name === "let") { + const isFollowedByBracket = isMemberExpression(parent, { + object: node, + computed: true + }) || isOptionalMemberExpression(parent, { + object: node, + computed: true, + optional: false + }); + return isFirstInContext(printStack, isFollowedByBracket ? 1 | 8 | 16 | 32 : 32); + } + return node.name === "async" && isForOfStatement(parent) && node === parent.left; +} +function isFirstInContext(printStack, checkParam) { + const expressionStatement = checkParam & 1; + const arrowBody = checkParam & 2; + const exportDefault = checkParam & 4; + const forHead = checkParam & 8; + const forInHead = checkParam & 16; + const forOfHead = checkParam & 32; let i = printStack.length - 1; + if (i <= 0) return; let node = printStack[i]; i--; let parent = printStack[i]; - while (i >= 0) { - if (t.isExpressionStatement(parent, { + if (expressionStatement && isExpressionStatement(parent, { expression: node - }) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { + }) || exportDefault && isExportDefaultDeclaration(parent, { declaration: node - }) || considerArrow && t.isArrowFunctionExpression(parent, { + }) || arrowBody && isArrowFunctionExpression(parent, { body: node + }) || forHead && isForStatement(parent, { + init: node + }) || forInHead && isForInStatement(parent, { + left: node + }) || forOfHead && isForOfStatement(parent, { + left: node })) { return true; } - - if (hasPostfixPart(node, parent) && !t.isNewExpression(parent) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isConditional(parent, { + if (i > 0 && (hasPostfixPart(node, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isUpdateExpression(parent) && !parent.prefix || isConditional(parent, { test: node - }) || t.isBinary(parent, { + }) || isBinary(parent, { left: node - }) || t.isAssignmentExpression(parent, { + }) || isAssignmentExpression(parent, { left: node - })) { + }))) { node = parent; i--; parent = printStack[i]; @@ -248,6 +299,7 @@ function isFirstInStatement(printStack, { return false; } } - return false; -} \ No newline at end of file +} + +//# sourceMappingURL=parentheses.js.map diff --git a/node_modules/@babel/generator/lib/node/parentheses.js.map b/node_modules/@babel/generator/lib/node/parentheses.js.map new file mode 100644 index 00000000..b300fc57 --- /dev/null +++ b/node_modules/@babel/generator/lib/node/parentheses.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","isArrayTypeAnnotation","isArrowFunctionExpression","isAssignmentExpression","isAwaitExpression","isBinary","isBinaryExpression","isUpdateExpression","isCallExpression","isClass","isClassExpression","isConditional","isConditionalExpression","isExportDeclaration","isExportDefaultDeclaration","isExpressionStatement","isFor","isForInStatement","isForOfStatement","isForStatement","isFunctionExpression","isIfStatement","isIndexedAccessType","isIntersectionTypeAnnotation","isLogicalExpression","isMemberExpression","isNewExpression","isNullableTypeAnnotation","isObjectPattern","isOptionalCallExpression","isOptionalMemberExpression","isReturnStatement","isSequenceExpression","isSwitchStatement","isTSArrayType","isTSAsExpression","isTSInstantiationExpression","isTSIntersectionType","isTSNonNullExpression","isTSOptionalType","isTSRestType","isTSTypeAssertion","isTSUnionType","isTaggedTemplateExpression","isThrowStatement","isTypeAnnotation","isUnaryLike","isUnionTypeAnnotation","isVariableDeclarator","isWhileStatement","isYieldExpression","isTSSatisfiesExpression","PRECEDENCE","in","instanceof","isTSTypeExpression","node","isClassExtendsClause","parent","superClass","hasPostfixPart","object","callee","tag","NullableTypeAnnotation","FunctionTypeAnnotation","printStack","length","UpdateExpression","ObjectExpression","isFirstInContext","DoExpression","async","Binary","operator","left","parentOp","parentPos","nodeOp","nodePos","right","UnionTypeAnnotation","OptionalIndexedAccessType","objectType","TSAsExpression","TSUnionType","TSInferType","TSInstantiationExpression","typeParameters","BinaryExpression","SequenceExpression","test","discriminant","expression","YieldExpression","ClassExpression","UnaryLike","FunctionExpression","ArrowFunctionExpression","ConditionalExpression","OptionalMemberExpression","AssignmentExpression","LogicalExpression","Identifier","_node$extra","extra","parenthesized","id","name","isFollowedByBracket","computed","optional","checkParam","expressionStatement","arrowBody","exportDefault","forHead","forInHead","forOfHead","i","declaration","body","init","expressions","prefix"],"sources":["../../src/node/parentheses.ts"],"sourcesContent":["import {\n isArrayTypeAnnotation,\n isArrowFunctionExpression,\n isAssignmentExpression,\n isAwaitExpression,\n isBinary,\n isBinaryExpression,\n isUpdateExpression,\n isCallExpression,\n isClass,\n isClassExpression,\n isConditional,\n isConditionalExpression,\n isExportDeclaration,\n isExportDefaultDeclaration,\n isExpressionStatement,\n isFor,\n isForInStatement,\n isForOfStatement,\n isForStatement,\n isFunctionExpression,\n isIfStatement,\n isIndexedAccessType,\n isIntersectionTypeAnnotation,\n isLogicalExpression,\n isMemberExpression,\n isNewExpression,\n isNullableTypeAnnotation,\n isObjectPattern,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isReturnStatement,\n isSequenceExpression,\n isSwitchStatement,\n isTSArrayType,\n isTSAsExpression,\n isTSInstantiationExpression,\n isTSIntersectionType,\n isTSNonNullExpression,\n isTSOptionalType,\n isTSRestType,\n isTSTypeAssertion,\n isTSUnionType,\n isTaggedTemplateExpression,\n isThrowStatement,\n isTypeAnnotation,\n isUnaryLike,\n isUnionTypeAnnotation,\n isVariableDeclarator,\n isWhileStatement,\n isYieldExpression,\n isTSSatisfiesExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nconst PRECEDENCE = {\n \"||\": 0,\n \"??\": 0,\n \"|>\": 0,\n \"&&\": 1,\n \"|\": 2,\n \"^\": 3,\n \"&\": 4,\n \"==\": 5,\n \"===\": 5,\n \"!=\": 5,\n \"!==\": 5,\n \"<\": 6,\n \">\": 6,\n \"<=\": 6,\n \">=\": 6,\n in: 6,\n instanceof: 6,\n \">>\": 7,\n \"<<\": 7,\n \">>>\": 7,\n \"+\": 8,\n \"-\": 8,\n \"*\": 9,\n \"/\": 9,\n \"%\": 9,\n \"**\": 10,\n};\n\nconst enum CheckParam {\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n forHead = 1 << 3,\n forInHead = 1 << 4,\n forOfHead = 1 << 5,\n}\n\nfunction isTSTypeExpression(node: t.Node) {\n return (\n isTSAsExpression(node) ||\n isTSSatisfiesExpression(node) ||\n isTSTypeAssertion(node)\n );\n}\n\nconst isClassExtendsClause = (\n node: t.Node,\n parent: t.Node,\n): parent is t.Class => isClass(parent, { superClass: node });\n\nconst hasPostfixPart = (node: t.Node, parent: t.Node) =>\n ((isMemberExpression(parent) || isOptionalMemberExpression(parent)) &&\n parent.object === node) ||\n ((isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent)) &&\n parent.callee === node) ||\n (isTaggedTemplateExpression(parent) && parent.tag === node) ||\n isTSNonNullExpression(parent);\n\nexport function NullableTypeAnnotation(\n node: t.NullableTypeAnnotation,\n parent: t.Node,\n): boolean {\n return isArrayTypeAnnotation(parent);\n}\n\nexport function FunctionTypeAnnotation(\n node: t.FunctionTypeAnnotation,\n parent: t.Node,\n printStack: Array,\n): boolean {\n if (printStack.length < 3) return;\n\n return (\n // (() => A) | (() => B)\n isUnionTypeAnnotation(parent) ||\n // (() => A) & (() => B)\n isIntersectionTypeAnnotation(parent) ||\n // (() => A)[]\n isArrayTypeAnnotation(parent) ||\n // (A: T): (T => T[]) => B => [A, B]\n (isTypeAnnotation(parent) &&\n // Check grandparent\n isArrowFunctionExpression(printStack[printStack.length - 3]))\n );\n}\n\nexport function UpdateExpression(\n node: t.UpdateExpression,\n parent: t.Node,\n): boolean {\n return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n}\n\nexport function ObjectExpression(\n node: t.ObjectExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.arrowBody,\n );\n}\n\nexport function DoExpression(\n node: t.DoExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // `async do` can start an expression statement\n return (\n !node.async && isFirstInContext(printStack, CheckParam.expressionStatement)\n );\n}\n\nexport function Binary(node: t.BinaryExpression, parent: t.Node): boolean {\n if (\n node.operator === \"**\" &&\n isBinaryExpression(parent, { operator: \"**\" })\n ) {\n return parent.left === node;\n }\n\n if (isClassExtendsClause(node, parent)) {\n return true;\n }\n\n if (\n hasPostfixPart(node, parent) ||\n isUnaryLike(parent) ||\n isAwaitExpression(parent)\n ) {\n return true;\n }\n\n if (isBinary(parent)) {\n const parentOp = parent.operator;\n const parentPos = PRECEDENCE[parentOp];\n\n const nodeOp = node.operator;\n const nodePos = PRECEDENCE[nodeOp];\n\n if (\n // Logical expressions with the same precedence don't need parens.\n (parentPos === nodePos &&\n parent.right === node &&\n !isLogicalExpression(parent)) ||\n parentPos > nodePos\n ) {\n return true;\n }\n }\n}\n\nexport function UnionTypeAnnotation(\n node: t.UnionTypeAnnotation,\n parent: t.Node,\n): boolean {\n return (\n isArrayTypeAnnotation(parent) ||\n isNullableTypeAnnotation(parent) ||\n isIntersectionTypeAnnotation(parent) ||\n isUnionTypeAnnotation(parent)\n );\n}\n\nexport { UnionTypeAnnotation as IntersectionTypeAnnotation };\n\nexport function OptionalIndexedAccessType(\n node: t.OptionalIndexedAccessType,\n parent: t.Node,\n): boolean {\n return isIndexedAccessType(parent, { objectType: node });\n}\n\nexport function TSAsExpression() {\n return true;\n}\n\nexport {\n TSAsExpression as TSSatisfiesExpression,\n TSAsExpression as TSTypeAssertion,\n};\n\nexport function TSUnionType(node: t.TSUnionType, parent: t.Node): boolean {\n return (\n isTSArrayType(parent) ||\n isTSOptionalType(parent) ||\n isTSIntersectionType(parent) ||\n isTSUnionType(parent) ||\n isTSRestType(parent)\n );\n}\n\nexport { TSUnionType as TSIntersectionType };\n\nexport function TSInferType(node: t.TSInferType, parent: t.Node): boolean {\n return isTSArrayType(parent) || isTSOptionalType(parent);\n}\n\nexport function TSInstantiationExpression(\n node: t.TSInstantiationExpression,\n parent: t.Node,\n) {\n return (\n (isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent) ||\n isTSInstantiationExpression(parent)) &&\n !!parent.typeParameters\n );\n}\n\nexport function BinaryExpression(\n node: t.BinaryExpression,\n parent: t.Node,\n): boolean {\n // let i = (1 in []);\n // for ((1 in []);;);\n return (\n node.operator === \"in\" && (isVariableDeclarator(parent) || isFor(parent))\n );\n}\n\nexport function SequenceExpression(\n node: t.SequenceExpression,\n parent: t.Node,\n): boolean {\n if (\n // Although parentheses wouldn't hurt around sequence\n // expressions in the head of for loops, traditional style\n // dictates that e.g. i++, j++ should not be wrapped with\n // parentheses.\n isForStatement(parent) ||\n isThrowStatement(parent) ||\n isReturnStatement(parent) ||\n (isIfStatement(parent) && parent.test === node) ||\n (isWhileStatement(parent) && parent.test === node) ||\n (isForInStatement(parent) && parent.right === node) ||\n (isSwitchStatement(parent) && parent.discriminant === node) ||\n (isExpressionStatement(parent) && parent.expression === node)\n ) {\n return false;\n }\n\n // Otherwise err on the side of overparenthesization, adding\n // explicit exceptions above if this proves overzealous.\n return true;\n}\n\nexport function YieldExpression(\n node: t.YieldExpression,\n parent: t.Node,\n): boolean {\n return (\n isBinary(parent) ||\n isUnaryLike(parent) ||\n hasPostfixPart(node, parent) ||\n (isAwaitExpression(parent) && isYieldExpression(node)) ||\n (isConditionalExpression(parent) && node === parent.test) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport { YieldExpression as AwaitExpression };\n\nexport function ClassExpression(\n node: t.ClassExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function UnaryLike(\n node:\n | t.UnaryLike\n | t.ArrowFunctionExpression\n | t.ConditionalExpression\n | t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n return (\n hasPostfixPart(node, parent) ||\n isBinaryExpression(parent, { operator: \"**\", left: node }) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport function FunctionExpression(\n node: t.FunctionExpression,\n parent: t.Node,\n printStack: Array,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function ArrowFunctionExpression(\n node: t.ArrowFunctionExpression,\n parent: t.Node,\n): boolean {\n return isExportDeclaration(parent) || ConditionalExpression(node, parent);\n}\n\nexport function ConditionalExpression(\n node:\n | t.ConditionalExpression\n | t.ArrowFunctionExpression\n | t.AssignmentExpression,\n parent?: t.Node,\n): boolean {\n if (\n isUnaryLike(parent) ||\n isBinary(parent) ||\n isConditionalExpression(parent, { test: node }) ||\n isAwaitExpression(parent) ||\n isTSTypeExpression(parent)\n ) {\n return true;\n }\n\n return UnaryLike(node, parent);\n}\n\nexport function OptionalMemberExpression(\n node: t.OptionalMemberExpression,\n parent: t.Node,\n): boolean {\n return (\n isCallExpression(parent, { callee: node }) ||\n isMemberExpression(parent, { object: node })\n );\n}\n\nexport { OptionalMemberExpression as OptionalCallExpression };\n\nexport function AssignmentExpression(\n node: t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n if (isObjectPattern(node.left)) {\n return true;\n } else {\n return ConditionalExpression(node, parent);\n }\n}\n\nexport function LogicalExpression(\n node: t.LogicalExpression,\n parent: t.Node,\n): boolean {\n if (isTSTypeExpression(parent)) return true;\n switch (node.operator) {\n case \"||\":\n if (!isLogicalExpression(parent)) return false;\n return parent.operator === \"??\" || parent.operator === \"&&\";\n case \"&&\":\n return isLogicalExpression(parent, { operator: \"??\" });\n case \"??\":\n return isLogicalExpression(parent) && parent.operator !== \"??\";\n }\n}\n\nexport function Identifier(\n node: t.Identifier,\n parent: t.Node,\n printStack: Array,\n): boolean {\n // 13.15.2 AssignmentExpression RS: Evaluation\n // (fn) = function () {};\n if (\n node.extra?.parenthesized &&\n isAssignmentExpression(parent, { left: node }) &&\n (isFunctionExpression(parent.right) || isClassExpression(parent.right)) &&\n parent.right.id == null\n ) {\n return true;\n }\n // Non-strict code allows the identifier `let`, but it cannot occur as-is in\n // certain contexts to avoid ambiguity with contextual keyword `let`.\n if (node.name === \"let\") {\n // Some contexts only forbid `let [`, so check if the next token would\n // be the left bracket of a computed member expression.\n const isFollowedByBracket =\n isMemberExpression(parent, {\n object: node,\n computed: true,\n }) ||\n isOptionalMemberExpression(parent, {\n object: node,\n computed: true,\n optional: false,\n });\n return isFirstInContext(\n printStack,\n isFollowedByBracket\n ? CheckParam.expressionStatement |\n CheckParam.forHead |\n CheckParam.forInHead |\n CheckParam.forOfHead\n : CheckParam.forOfHead,\n );\n }\n\n // ECMAScript specifically forbids a for-of loop from starting with the\n // token sequence `for (async of`, because it would be ambiguous with\n // `for (async of => {};;)`, so we need to add extra parentheses.\n //\n // If the parent is a for-await-of loop (i.e. parent.await === true), the\n // parentheses aren't strictly needed, but we add them anyway because\n // some tools (including earlier Babel versions) can't parse\n // `for await (async of [])` without them.\n return (\n node.name === \"async\" && isForOfStatement(parent) && node === parent.left\n );\n}\n\n// Walk up the print stack to determine if our node can come first\n// in a particular context.\nfunction isFirstInContext(\n printStack: Array,\n checkParam: CheckParam,\n): boolean {\n const expressionStatement = checkParam & CheckParam.expressionStatement;\n const arrowBody = checkParam & CheckParam.arrowBody;\n const exportDefault = checkParam & CheckParam.exportDefault;\n const forHead = checkParam & CheckParam.forHead;\n const forInHead = checkParam & CheckParam.forInHead;\n const forOfHead = checkParam & CheckParam.forOfHead;\n\n let i = printStack.length - 1;\n if (i <= 0) return;\n let node = printStack[i];\n i--;\n let parent = printStack[i];\n while (i >= 0) {\n if (\n (expressionStatement &&\n isExpressionStatement(parent, { expression: node })) ||\n (exportDefault &&\n isExportDefaultDeclaration(parent, { declaration: node })) ||\n (arrowBody && isArrowFunctionExpression(parent, { body: node })) ||\n (forHead && isForStatement(parent, { init: node })) ||\n (forInHead && isForInStatement(parent, { left: node })) ||\n (forOfHead && isForOfStatement(parent, { left: node }))\n ) {\n return true;\n }\n\n if (\n i > 0 &&\n ((hasPostfixPart(node, parent) && !isNewExpression(parent)) ||\n (isSequenceExpression(parent) && parent.expressions[0] === node) ||\n (isUpdateExpression(parent) && !parent.prefix) ||\n isConditional(parent, { test: node }) ||\n isBinary(parent, { left: node }) ||\n isAssignmentExpression(parent, { left: node }))\n ) {\n node = parent;\n i--;\n parent = printStack[i];\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAoDsB;EAnDpBC,qBAAqB;EACrBC,yBAAyB;EACzBC,sBAAsB;EACtBC,iBAAiB;EACjBC,QAAQ;EACRC,kBAAkB;EAClBC,kBAAkB;EAClBC,gBAAgB;EAChBC,OAAO;EACPC,iBAAiB;EACjBC,aAAa;EACbC,uBAAuB;EACvBC,mBAAmB;EACnBC,0BAA0B;EAC1BC,qBAAqB;EACrBC,KAAK;EACLC,gBAAgB;EAChBC,gBAAgB;EAChBC,cAAc;EACdC,oBAAoB;EACpBC,aAAa;EACbC,mBAAmB;EACnBC,4BAA4B;EAC5BC,mBAAmB;EACnBC,kBAAkB;EAClBC,eAAe;EACfC,wBAAwB;EACxBC,eAAe;EACfC,wBAAwB;EACxBC,0BAA0B;EAC1BC,iBAAiB;EACjBC,oBAAoB;EACpBC,iBAAiB;EACjBC,aAAa;EACbC,gBAAgB;EAChBC,2BAA2B;EAC3BC,oBAAoB;EACpBC,qBAAqB;EACr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KAAKnE,IAAK,IAC/DjD,kBAAkB,CAACmD,MAAM,CAAC,IAAI,CAACA,MAAM,CAACkE,MAAO,IAC9CjH,aAAa,CAAC+C,MAAM,EAAE;MAAEiC,IAAI,EAAEnC;IAAK,CAAC,CAAC,IACrCnD,QAAQ,CAACqD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,IAChCrD,sBAAsB,CAACuD,MAAM,EAAE;MAAEiB,IAAI,EAAEnB;IAAK,CAAC,CAAC,CAAC,EACjD;MACAA,IAAI,GAAGE,MAAM;MACb6D,CAAC,EAAE;MACH7D,MAAM,GAAGQ,UAAU,CAACqD,CAAC,CAAC;IACxB,CAAC,MAAM;MACL,OAAO,KAAK;IACd;EACF;EAEA,OAAO,KAAK;AACd"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/whitespace.js b/node_modules/@babel/generator/lib/node/whitespace.js index cf835345..17daf359 100644 --- a/node_modules/@babel/generator/lib/node/whitespace.js +++ b/node_modules/@babel/generator/lib/node/whitespace.js @@ -3,199 +3,144 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.list = exports.nodes = void 0; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function crawl(node, state = {}) { - if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) { - crawl(node.object, state); - if (node.computed) crawl(node.property, state); - } else if (t.isBinary(node) || t.isAssignmentExpression(node)) { - crawl(node.left, state); - crawl(node.right, state); - } else if (t.isCallExpression(node) || t.isOptionalCallExpression(node)) { +exports.nodes = void 0; +var _t = require("@babel/types"); +const { + FLIPPED_ALIAS_KEYS, + isArrayExpression, + isAssignmentExpression, + isBinary, + isBlockStatement, + isCallExpression, + isFunction, + isIdentifier, + isLiteral, + isMemberExpression, + isObjectExpression, + isOptionalCallExpression, + isOptionalMemberExpression, + isStringLiteral +} = _t; +function crawlInternal(node, state) { + if (!node) return state; + if (isMemberExpression(node) || isOptionalMemberExpression(node)) { + crawlInternal(node.object, state); + if (node.computed) crawlInternal(node.property, state); + } else if (isBinary(node) || isAssignmentExpression(node)) { + crawlInternal(node.left, state); + crawlInternal(node.right, state); + } else if (isCallExpression(node) || isOptionalCallExpression(node)) { state.hasCall = true; - crawl(node.callee, state); - } else if (t.isFunction(node)) { + crawlInternal(node.callee, state); + } else if (isFunction(node)) { state.hasFunction = true; - } else if (t.isIdentifier(node)) { - state.hasHelper = state.hasHelper || isHelper(node.callee); + } else if (isIdentifier(node)) { + state.hasHelper = state.hasHelper || node.callee && isHelper(node.callee); } - return state; } - +function crawl(node) { + return crawlInternal(node, { + hasCall: false, + hasFunction: false, + hasHelper: false + }); +} function isHelper(node) { - if (t.isMemberExpression(node)) { + if (!node) return false; + if (isMemberExpression(node)) { return isHelper(node.object) || isHelper(node.property); - } else if (t.isIdentifier(node)) { - return node.name === "require" || node.name[0] === "_"; - } else if (t.isCallExpression(node)) { + } else if (isIdentifier(node)) { + return node.name === "require" || node.name.charCodeAt(0) === 95; + } else if (isCallExpression(node)) { return isHelper(node.callee); - } else if (t.isBinary(node) || t.isAssignmentExpression(node)) { - return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); + } else if (isBinary(node) || isAssignmentExpression(node)) { + return isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); } else { return false; } } - function isType(node) { - return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node); + return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node); } - const nodes = { AssignmentExpression(node) { const state = crawl(node.right); - if (state.hasCall && state.hasHelper || state.hasFunction) { - return { - before: state.hasFunction, - after: true - }; + return state.hasFunction ? 1 | 2 : 2; } }, - SwitchCase(node, parent) { - return { - before: !!node.consequent.length || parent.cases[0] === node, - after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node - }; + return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0); }, - LogicalExpression(node) { - if (t.isFunction(node.left) || t.isFunction(node.right)) { - return { - after: true - }; + if (isFunction(node.left) || isFunction(node.right)) { + return 2; } }, - Literal(node) { - if (t.isStringLiteral(node) && node.value === "use strict") { - return { - after: true - }; + if (isStringLiteral(node) && node.value === "use strict") { + return 2; } }, - CallExpression(node) { - if (t.isFunction(node.callee) || isHelper(node)) { - return { - before: true, - after: true - }; + if (isFunction(node.callee) || isHelper(node)) { + return 1 | 2; } }, - OptionalCallExpression(node) { - if (t.isFunction(node.callee)) { - return { - before: true, - after: true - }; + if (isFunction(node.callee)) { + return 1 | 2; } }, - 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) { + if (!enabled && declar.init) { const state = crawl(declar.init); enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; } - if (enabled) { - return { - before: true, - after: true - }; + return 1 | 2; } } }, - IfStatement(node) { - if (t.isBlockStatement(node.consequent)) { - return { - before: true, - after: true - }; + if (isBlockStatement(node.consequent)) { + return 1 | 2; } } - }; exports.nodes = nodes; - nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { if (parent.properties[0] === node) { - return { - before: true - }; + return 1; } }; - nodes.ObjectTypeCallProperty = function (node, parent) { var _parent$properties; - if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) { - return { - before: true - }; + return 1; } }; - nodes.ObjectTypeIndexer = function (node, parent) { var _parent$properties2, _parent$callPropertie; - if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) { - return { - before: true - }; + return 1; } }; - nodes.ObjectTypeInternalSlot = function (node, parent) { var _parent$properties3, _parent$callPropertie2, _parent$indexers; - if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) { - return { - before: true - }; - } -}; - -const list = { - VariableDeclaration(node) { - return node.declarations.map(decl => decl.init); - }, - - ArrayExpression(node) { - return node.elements; - }, - - ObjectExpression(node) { - return node.properties; + return 1; } - }; -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, - before: amounts - }; - } - - [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { - nodes[type] = function () { - return amounts; - }; + [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { + const ret = amounts ? 1 | 2 : 0; + nodes[type] = () => ret; }); -}); \ No newline at end of file +}); + +//# sourceMappingURL=whitespace.js.map diff --git a/node_modules/@babel/generator/lib/node/whitespace.js.map b/node_modules/@babel/generator/lib/node/whitespace.js.map new file mode 100644 index 00000000..249c40be --- /dev/null +++ b/node_modules/@babel/generator/lib/node/whitespace.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","FLIPPED_ALIAS_KEYS","isArrayExpression","isAssignmentExpression","isBinary","isBlockStatement","isCallExpression","isFunction","isIdentifier","isLiteral","isMemberExpression","isObjectExpression","isOptionalCallExpression","isOptionalMemberExpression","isStringLiteral","crawlInternal","node","state","object","computed","property","left","right","hasCall","callee","hasFunction","hasHelper","isHelper","crawl","name","charCodeAt","isType","nodes","AssignmentExpression","SwitchCase","parent","consequent","length","cases","LogicalExpression","Literal","value","CallExpression","OptionalCallExpression","VariableDeclaration","i","declarations","declar","enabled","id","init","IfStatement","exports","ObjectProperty","ObjectTypeProperty","ObjectMethod","properties","ObjectTypeCallProperty","_parent$properties","callProperties","ObjectTypeIndexer","_parent$properties2","_parent$callPropertie","indexers","ObjectTypeInternalSlot","_parent$properties3","_parent$callPropertie2","_parent$indexers","internalSlots","forEach","type","amounts","concat","ret"],"sources":["../../src/node/whitespace.ts"],"sourcesContent":["import {\n FLIPPED_ALIAS_KEYS,\n isArrayExpression,\n isAssignmentExpression,\n isBinary,\n isBlockStatement,\n isCallExpression,\n isFunction,\n isIdentifier,\n isLiteral,\n isMemberExpression,\n isObjectExpression,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isStringLiteral,\n} from \"@babel/types\";\nimport * as charCodes from \"charcodes\";\n\nimport type { NodeHandlers } from \"./index\";\n\nimport type * as t from \"@babel/types\";\n\nconst enum WhitespaceFlag {\n before = 1 << 0,\n after = 1 << 1,\n}\n\nexport type { WhitespaceFlag };\n\nfunction crawlInternal(\n node: t.Node,\n state: { hasCall: boolean; hasFunction: boolean; hasHelper: boolean },\n) {\n if (!node) return state;\n\n if (isMemberExpression(node) || isOptionalMemberExpression(node)) {\n crawlInternal(node.object, state);\n if (node.computed) crawlInternal(node.property, state);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n crawlInternal(node.left, state);\n crawlInternal(node.right, state);\n } else if (isCallExpression(node) || isOptionalCallExpression(node)) {\n state.hasCall = true;\n crawlInternal(node.callee, state);\n } else if (isFunction(node)) {\n state.hasFunction = true;\n } else if (isIdentifier(node)) {\n state.hasHelper =\n // @ts-expect-error todo(flow->ts): node.callee is not really expected here…\n state.hasHelper || (node.callee && isHelper(node.callee));\n }\n\n return state;\n}\n\n/**\n * Crawl a node to test if it contains a CallExpression, a Function, or a Helper.\n *\n * @example\n * crawl(node)\n * // { hasCall: false, hasFunction: true, hasHelper: false }\n */\n\nfunction crawl(node: t.Node) {\n return crawlInternal(node, {\n hasCall: false,\n hasFunction: false,\n hasHelper: false,\n });\n}\n\n/**\n * Test if a node is or has a helper.\n */\n\nfunction isHelper(node: t.Node): boolean {\n if (!node) return false;\n\n if (isMemberExpression(node)) {\n return isHelper(node.object) || isHelper(node.property);\n } else if (isIdentifier(node)) {\n return (\n node.name === \"require\" ||\n node.name.charCodeAt(0) === charCodes.underscore\n );\n } else if (isCallExpression(node)) {\n return isHelper(node.callee);\n } else if (isBinary(node) || isAssignmentExpression(node)) {\n return (\n (isIdentifier(node.left) && isHelper(node.left)) || isHelper(node.right)\n );\n } else {\n return false;\n }\n}\n\nfunction isType(node: t.Node) {\n return (\n isLiteral(node) ||\n isObjectExpression(node) ||\n isArrayExpression(node) ||\n isIdentifier(node) ||\n isMemberExpression(node)\n );\n}\n\n/**\n * Tests for node types that need whitespace.\n */\n\nexport const nodes: NodeHandlers = {\n /**\n * Test if AssignmentExpression needs whitespace.\n */\n\n AssignmentExpression(node: t.AssignmentExpression): WhitespaceFlag {\n const state = crawl(node.right);\n if ((state.hasCall && state.hasHelper) || state.hasFunction) {\n return state.hasFunction\n ? WhitespaceFlag.before | WhitespaceFlag.after\n : WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if SwitchCase needs whitespace.\n */\n\n SwitchCase(node: t.SwitchCase, parent: t.SwitchStatement): WhitespaceFlag {\n return (\n (!!node.consequent.length || parent.cases[0] === node\n ? WhitespaceFlag.before\n : 0) |\n (!node.consequent.length && parent.cases[parent.cases.length - 1] === node\n ? WhitespaceFlag.after\n : 0)\n );\n },\n\n /**\n * Test if LogicalExpression needs whitespace.\n */\n\n LogicalExpression(node: t.LogicalExpression): WhitespaceFlag {\n if (isFunction(node.left) || isFunction(node.right)) {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if Literal needs whitespace.\n */\n\n Literal(node: t.Literal): WhitespaceFlag {\n if (isStringLiteral(node) && node.value === \"use strict\") {\n return WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if CallExpressionish needs whitespace.\n */\n\n CallExpression(node: t.CallExpression): WhitespaceFlag {\n if (isFunction(node.callee) || isHelper(node)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n OptionalCallExpression(node: t.OptionalCallExpression): WhitespaceFlag {\n if (isFunction(node.callee)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n\n /**\n * Test if VariableDeclaration needs whitespace.\n */\n\n VariableDeclaration(node: t.VariableDeclaration): WhitespaceFlag {\n for (let i = 0; i < node.declarations.length; i++) {\n const declar = node.declarations[i];\n\n let enabled = isHelper(declar.id) && !isType(declar.init);\n if (!enabled && declar.init) {\n const state = crawl(declar.init);\n enabled = (isHelper(declar.init) && state.hasCall) || state.hasFunction;\n }\n\n if (enabled) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n }\n },\n\n /**\n * Test if IfStatement needs whitespace.\n */\n\n IfStatement(node: t.IfStatement): WhitespaceFlag {\n if (isBlockStatement(node.consequent)) {\n return WhitespaceFlag.before | WhitespaceFlag.after;\n }\n },\n};\n\n/**\n * Test if Property needs whitespace.\n */\n\nnodes.ObjectProperty =\n nodes.ObjectTypeProperty =\n nodes.ObjectMethod =\n function (\n node: t.ObjectProperty | t.ObjectTypeProperty | t.ObjectMethod,\n parent: t.ObjectExpression,\n ): WhitespaceFlag {\n if (parent.properties[0] === node) {\n return WhitespaceFlag.before;\n }\n };\n\nnodes.ObjectTypeCallProperty = function (\n node: t.ObjectTypeCallProperty,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (parent.callProperties[0] === node && !parent.properties?.length) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeIndexer = function (\n node: t.ObjectTypeIndexer,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.indexers[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\nnodes.ObjectTypeInternalSlot = function (\n node: t.ObjectTypeInternalSlot,\n parent: t.ObjectTypeAnnotation,\n): WhitespaceFlag {\n if (\n parent.internalSlots[0] === node &&\n !parent.properties?.length &&\n !parent.callProperties?.length &&\n !parent.indexers?.length\n ) {\n return WhitespaceFlag.before;\n }\n};\n\n/**\n * Add whitespace tests for nodes and their aliases.\n */\n\n(\n [\n [\"Function\", true],\n [\"Class\", true],\n [\"Loop\", true],\n [\"LabeledStatement\", true],\n [\"SwitchStatement\", true],\n [\"TryStatement\", true],\n ] as const\n).forEach(function ([type, amounts]) {\n [type as string]\n .concat(FLIPPED_ALIAS_KEYS[type] || [])\n .forEach(function (type) {\n const ret = amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0;\n nodes[type] = () => ret;\n });\n});\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAesB;EAdpBC,kBAAkB;EAClBC,iBAAiB;EACjBC,sBAAsB;EACtBC,QAAQ;EACRC,gBAAgB;EAChBC,gBAAgB;EAChBC,UAAU;EACVC,YAAY;EACZC,SAAS;EACTC,kBAAkB;EAClBC,kBAAkB;EAClBC,wBAAwB;EACxBC,0BAA0B;EAC1BC;AAAe,IAAAf,EAAA;AAejB,SAASgB,aAAaA,CACpBC,IAAY,EACZC,KAAqE,EACrE;EACA,IAAI,CAACD,IAAI,EAAE,OAAOC,KAAK;EAEvB,IAAIP,kBAAkB,CAACM,IAAI,CAAC,IAAIH,0BAA0B,CAACG,IAAI,CAAC,EAAE;IAChED,aAAa,CAACC,IAAI,CAACE,MAAM,EAAED,KAAK,CAAC;IACjC,IAAID,IAAI,CAACG,Q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AAA8B,mBAAA,EAAAC,sBAAA,EAAAC,gBAAA;EAChB,IACEhC,MAAM,CAACiC,aAAa,CAAC,CAAC,CAAC,KAAKpD,IAAI,IAChC,GAAAiD,mBAAA,GAAC9B,MAAM,CAACqB,UAAU,aAAjBS,mBAAA,CAAmB5B,MAAM,KAC1B,GAAA6B,sBAAA,GAAC/B,MAAM,CAACwB,cAAc,aAArBO,sBAAA,CAAuB7B,MAAM,KAC9B,GAAA8B,gBAAA,GAAChC,MAAM,CAAC4B,QAAQ,aAAfI,gBAAA,CAAiB9B,MAAM,GACxB;IACA;EACF;AACF,CAAC;AAOC,CACE,CAAC,UAAU,EAAE,IAAI,CAAC,EAClB,CAAC,OAAO,EAAE,IAAI,CAAC,EACf,CAAC,MAAM,EAAE,IAAI,CAAC,EACd,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC1B,CAAC,iBAAiB,EAAE,IAAI,CAAC,EACzB,CAAC,cAAc,EAAE,IAAI,CAAC,CACvB,CACDgC,OAAO,CAAC,UAAU,CAACC,IAAI,EAAEC,OAAO,CAAC,EAAE;EACnC,CAACD,IAAI,CAAW,CACbE,MAAM,CAACvE,kBAAkB,CAACqE,IAAI,CAAC,IAAI,EAAE,CAAC,CACtCD,OAAO,CAAC,UAAUC,IAAI,EAAE;IACvB,MAAMG,GAAG,GAAGF,OAAO,GAAG,KAA4C,GAAG,CAAC;IACtEvC,KAAK,CAACsC,IAAI,CAAC,GAAG,MAAMG,GAAG;EACzB,CAAC,CAAC;AACN,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js index 2261bf1b..ae6fa9aa 100644 --- a/node_modules/@babel/generator/lib/printer.js +++ b/node_modules/@babel/generator/lib/printer.js @@ -4,514 +4,648 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - -var _buffer = _interopRequireDefault(require("./buffer")); - -var n = _interopRequireWildcard(require("./node")); - -var t = _interopRequireWildcard(require("@babel/types")); - -var generatorFunctions = _interopRequireWildcard(require("./generators")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _buffer = require("./buffer"); +var n = require("./node"); +var _t = require("@babel/types"); +var generatorFunctions = require("./generators"); +const { + isFunction, + isStatement, + isClassBody, + isTSInterfaceBody, + isTSEnumDeclaration +} = _t; const SCIENTIFIC_NOTATION = /e/i; const ZERO_DECIMAL_INTEGER = /\.0+$/; const NON_DECIMAL_LITERAL = /^0[box]/; const PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/; - +const HAS_NEWLINE = /[\n\r\u2028\u2029]/; +const HAS_BlOCK_COMMENT_END = /\*\//; +const { + needsParens +} = n; class Printer { constructor(format, map) { this.inForStatementInitCounter = 0; this._printStack = []; this._indent = 0; + this._indentChar = 0; + this._indentRepeat = 0; this._insideAux = false; - this._printedCommentStarts = {}; this._parenPushNewlineState = null; this._noLineTerminator = false; this._printAuxAfterOnNextUserNode = false; - this._printedComments = new WeakSet(); + this._printedComments = new Set(); this._endsWithInteger = false; this._endsWithWord = false; + this._lastCommentLine = 0; + this._endsWithInnerRaw = false; + this._indentInnerComments = true; this.format = format; this._buf = new _buffer.default(map); + this._indentChar = format.indent.style.charCodeAt(0); + this._indentRepeat = format.indent.style.length; + this._inputMap = map == null ? void 0 : map._inputMap; } - 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); + if (force) { + this._appendChar(59); + } else { + this._queue(59); + } + this._noLineTerminator = false; } - - rightBrace() { + rightBrace(node) { if (this.format.minified) { this._buf.removeLastSemicolon(); } - - this.token("}"); + this.sourceWithOffset("end", node.loc, 0, -1); + this.tokenChar(125); + } + rightParens(node) { + this.sourceWithOffset("end", node.loc, 0, -1); + this.tokenChar(41); } - space(force = false) { if (this.format.compact) return; - - if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { + if (force) { this._space(); + } else if (this._buf.hasContent()) { + const lastCp = this.getLastChar(); + if (lastCp !== 32 && lastCp !== 10) { + this._space(); + } } } - - word(str) { - if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { + word(str, noLineTerminatorAfter = false) { + this._maybePrintInnerComments(); + if (this._endsWithWord || str.charCodeAt(0) === 47 && this.endsWith(47)) { this._space(); } - this._maybeAddAuxComment(); - - this._append(str); - + this._append(str, false); this._endsWithWord = true; + this._noLineTerminator = noLineTerminatorAfter; } - number(str) { this.word(str); - this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; + this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46; } - - token(str) { - if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { + token(str, maybeNewline = false) { + this._maybePrintInnerComments(); + const lastChar = this.getLastChar(); + const strFirst = str.charCodeAt(0); + if (lastChar === 33 && (str === "--" || strFirst === 61) || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) { this._space(); } - this._maybeAddAuxComment(); - - this._append(str); + this._append(str, maybeNewline); + this._noLineTerminator = false; } - - newline(i) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; + tokenChar(char) { + this._maybePrintInnerComments(); + const lastChar = this.getLastChar(); + if (char === 43 && lastChar === 43 || char === 45 && lastChar === 45 || char === 46 && this._endsWithInteger) { + this._space(); } - - 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--; + this._maybeAddAuxComment(); + this._appendChar(char); + this._noLineTerminator = false; + } + newline(i = 1, force) { if (i <= 0) return; - + if (!force) { + if (this.format.retainLines || this.format.compact) return; + if (this.format.concise) { + this.space(); + return; + } + } + if (i > 2) i = 2; + i -= this._buf.getNewlineCount(); for (let j = 0; j < i; j++) { this._newline(); } + return; } - - endsWith(str) { - return this._buf.endsWith(str); + endsWith(char) { + return this.getLastChar() === char; + } + getLastChar() { + return this._buf.getLastChar(); + } + endsWithCharAndNewline() { + return this._buf.endsWithCharAndNewline(); } - removeTrailingNewline() { this._buf.removeTrailingNewline(); } - exactSource(loc, cb) { + if (!loc) { + cb(); + return; + } this._catchUp("start", loc); - this._buf.exactSource(loc, cb); } - source(prop, loc) { + if (!loc) return; this._catchUp(prop, loc); - this._buf.source(prop, loc); } - + sourceWithOffset(prop, loc, lineOffset, columnOffset) { + if (!loc) return; + this._catchUp(prop, loc); + this._buf.sourceWithOffset(prop, loc, lineOffset, columnOffset); + } withSource(prop, loc, cb) { + if (!loc) { + cb(); + return; + } this._catchUp(prop, loc); - this._buf.withSource(prop, loc, cb); } - + sourceIdentifierName(identifierName, pos) { + if (!this._buf._canMarkIdName) return; + const sourcePosition = this._buf._sourcePosition; + sourcePosition.identifierNamePos = pos; + sourcePosition.identifierName = identifierName; + } _space() { - this._append(" ", true); + this._queue(32); } - _newline() { - this._append("\n", true); + this._queue(10); } - - _append(str, queue = false) { + _append(str, maybeNewline) { this._maybeAddParen(str); - - this._maybeIndent(str); - - if (queue) this._buf.queue(str);else this._buf.append(str); + this._maybeIndent(str.charCodeAt(0)); + this._buf.append(str, maybeNewline); this._endsWithWord = false; this._endsWithInteger = false; } - - _maybeIndent(str) { - if (this._indent && this.endsWith("\n") && str[0] !== "\n") { - this._buf.queue(this._getIndent()); + _appendChar(char) { + this._maybeAddParenChar(char); + this._maybeIndent(char); + this._buf.appendChar(char); + this._endsWithWord = false; + this._endsWithInteger = false; + } + _queue(char) { + this._maybeAddParenChar(char); + this._maybeIndent(char); + this._buf.queue(char); + this._endsWithWord = false; + this._endsWithInteger = false; + } + _maybeIndent(firstChar) { + if (this._indent && firstChar !== 10 && this.endsWith(10)) { + this._buf.queueIndentation(this._indentChar, this._getIndent()); } } - + _shouldIndent(firstChar) { + if (this._indent && firstChar !== 10 && this.endsWith(10)) { + return true; + } + } + _maybeAddParenChar(char) { + const parenPushNewlineState = this._parenPushNewlineState; + if (!parenPushNewlineState) return; + if (char === 32) { + return; + } + if (char !== 10) { + this._parenPushNewlineState = null; + return; + } + this.tokenChar(40); + this.indent(); + parenPushNewlineState.printed = true; + } _maybeAddParen(str) { const parenPushNewlineState = this._parenPushNewlineState; if (!parenPushNewlineState) return; + const len = str.length; let i; - - for (i = 0; i < str.length && str[i] === " "; i++) continue; - - if (i === str.length) { + for (i = 0; i < len && str.charCodeAt(i) === 32; i++) continue; + if (i === len) { return; } - - const cha = str[i]; - - if (cha !== "\n") { - if (cha !== "/" || i + 1 === str.length) { + const cha = str.charCodeAt(i); + if (cha !== 10) { + if (cha !== 47 || i + 1 === len) { this._parenPushNewlineState = null; return; } - - const chaPost = str[i + 1]; - - if (chaPost === "*") { - if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) { + const chaPost = str.charCodeAt(i + 1); + if (chaPost === 42) { + if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) { return; } - } else if (chaPost !== "/") { + } else if (chaPost !== 47) { this._parenPushNewlineState = null; return; } } - - this.token("("); + this.tokenChar(40); this.indent(); parenPushNewlineState.printed = true; } - + catchUp(line) { + if (!this.format.retainLines) return; + const count = line - this._buf.getCurrentLine(); + for (let i = 0; i < count; i++) { + this._newline(); + } + } _catchUp(prop, loc) { + var _loc$prop; if (!this.format.retainLines) return; - const pos = loc ? loc[prop] : null; - - if ((pos == null ? void 0 : pos.line) != null) { - const count = pos.line - this._buf.getCurrentLine(); - + const line = loc == null ? void 0 : (_loc$prop = loc[prop]) == null ? void 0 : _loc$prop.line; + if (line != null) { + const count = line - this._buf.getCurrentLine(); for (let i = 0; i < count; i++) { this._newline(); } } } - _getIndent() { - return this.format.indent.style.repeat(this._indent); + return this._indentRepeat * this._indent; } - - startTerminatorless(isLabel = false) { + printTerminatorless(node, parent, isLabel) { if (isLabel) { this._noLineTerminator = true; - return null; + this.print(node, parent); } else { - return this._parenPushNewlineState = { + const terminatorState = { printed: false }; + this._parenPushNewlineState = terminatorState; + this.print(node, parent); + if (terminatorState.printed) { + this.dedent(); + this.newline(); + this.tokenChar(41); + } } } - - endTerminatorless(state) { - this._noLineTerminator = false; - - if (state != null && state.printed) { - this.dedent(); - this.newline(); - this.token(")"); - } - } - - print(node, parent) { + print(node, parent, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) { + var _node$extra; if (!node) return; - const oldConcise = this.format.concise; - + this._endsWithInnerRaw = false; + const nodeType = node.type; + const format = this.format; + const oldConcise = format.concise; if (node._compact) { - this.format.concise = true; + 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 == null ? void 0 : node.constructor.name)}`); + const printMethod = this[nodeType]; + if (printMethod === undefined) { + throw new ReferenceError(`unknown node of type ${JSON.stringify(nodeType)} with constructor ${JSON.stringify(node.constructor.name)}`); } - this._printStack.push(node); - const oldInAux = this._insideAux; - this._insideAux = !node.loc; - + this._insideAux = node.loc == undefined; 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; + const shouldPrintParens = forceParens || format.retainFunctionParens && nodeType === "FunctionExpression" && ((_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized) || needsParens(node, parent, this._printStack); + if (shouldPrintParens) { + this.tokenChar(40); + this._endsWithInnerRaw = false; + } + this._lastCommentLine = 0; + this._printLeadingComments(node, parent); + const loc = nodeType === "Program" || nodeType === "File" ? null : node.loc; + this.exactSource(loc, printMethod.bind(this, node, parent)); + if (shouldPrintParens) { + this._printTrailingComments(node, parent); + this.tokenChar(41); + this._noLineTerminator = noLineTerminatorAfter; + } else if (noLineTerminatorAfter && !this._noLineTerminator) { + this._noLineTerminator = true; + this._printTrailingComments(node, parent); + } else { + this._printTrailingComments(node, parent, trailingCommentsLineOffset); } - - 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; + format.concise = oldConcise; this._insideAux = oldInAux; + this._endsWithInnerRaw = false; } - _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 - }); + }, 0); } } - _printAuxAfterComment() { if (!this._printAuxAfterOnNextUserNode) return; this._printAuxAfterOnNextUserNode = false; const comment = this.format.auxiliaryCommentAfter; - if (comment) { this._printComment({ type: "CommentBlock", value: comment - }); + }, 0); } } - 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 != null && nodes.length)) return; - if (opts.indent) this.indent(); + let { + indent + } = opts; + if (indent == null && this.format.retainLines) { + var _nodes$0$loc; + const startLine = (_nodes$0$loc = nodes[0].loc) == null ? void 0 : _nodes$0$loc.start.line; + if (startLine != null && startLine !== this._buf.getCurrentLine()) { + indent = true; + } + } + if (indent) this.indent(); const newlineOpts = { - addNewlines: opts.addNewlines + addNewlines: opts.addNewlines, + nextNodeStartLine: 0 }; - - for (let i = 0; i < nodes.length; i++) { + const separator = opts.separator ? opts.separator.bind(this) : null; + const len = nodes.length; + for (let i = 0; i < len; 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(i === 0, newlineOpts); + this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0); + opts.iterator == null ? void 0 : opts.iterator(node, i); + if (i < len - 1) separator == null ? void 0 : separator(); + if (opts.statement) { + if (i + 1 === len) { + this.newline(1); + } else { + var _nextNode$loc; + const nextNode = nodes[i + 1]; + newlineOpts.nextNodeStartLine = ((_nextNode$loc = nextNode.loc) == null ? void 0 : _nextNode$loc.start.line) || 0; + this._printNewline(true, newlineOpts); + } } - - if (opts.statement) this._printNewline(false, node, parent, newlineOpts); } - - if (opts.indent) this.dedent(); + if (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)) { + if (node.type !== "EmptyStatement") { this.space(); } - this.print(node, parent); } - - _printTrailingComments(node) { - this._printComments(this._getComments(false, node)); + _printTrailingComments(node, parent, lineOffset) { + const { + innerComments, + trailingComments + } = node; + if (innerComments != null && innerComments.length) { + this._printComments(2, innerComments, node, parent, lineOffset); + } + if (trailingComments != null && trailingComments.length) { + this._printComments(2, trailingComments, node, parent, lineOffset); + } } - - _printLeadingComments(node) { - this._printComments(this._getComments(true, node), true); + _printLeadingComments(node, parent) { + const comments = node.leadingComments; + if (!(comments != null && comments.length)) return; + this._printComments(0, comments, node, parent); } - - printInnerComments(node, indent = true) { - var _node$innerComments; - - if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length)) return; + _maybePrintInnerComments() { + if (this._endsWithInnerRaw) this.printInnerComments(); + this._endsWithInnerRaw = true; + this._indentInnerComments = true; + } + printInnerComments() { + const node = this._printStack[this._printStack.length - 1]; + const comments = node.innerComments; + if (!(comments != null && comments.length)) return; + const hasSpace = this.endsWith(32); + const indent = this._indentInnerComments; + const printedCommentsCount = this._printedComments.size; if (indent) this.indent(); - - this._printComments(node.innerComments); - + this._printComments(1, comments, node); + if (hasSpace && printedCommentsCount !== this._printedComments.size) { + this.space(); + } if (indent) this.dedent(); } - + noIndentInnerCommentsHere() { + this._indentInnerComments = false; + } printSequence(nodes, parent, opts = {}) { + var _opts$indent; opts.statement = true; - return this.printJoin(nodes, parent, opts); + (_opts$indent = opts.indent) != null ? _opts$indent : opts.indent = false; + this.printJoin(nodes, parent, opts); } - printList(items, parent, opts = {}) { if (opts.separator == null) { opts.separator = commaSeparator; } - - return this.printJoin(items, parent, opts); + this.printJoin(items, parent, opts); } - - _printNewline(leading, node, parent, opts) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { + _printNewline(newLine, opts) { + const format = this.format; + if (format.retainLines || format.compact) return; + if (format.concise) { this.space(); return; } - - let lines = 0; - + if (!newLine) { + return; + } + const startLine = opts.nextNodeStartLine; + const lastCommentLine = this._lastCommentLine; + if (startLine > 0 && lastCommentLine > 0) { + const offset = startLine - lastCommentLine; + if (offset >= 0) { + this.newline(offset || 1); + return; + } + } 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(1); } - - this.newline(lines); - } - - _getComments(leading, node) { - return node && (leading ? node.leadingComments : node.trailingComments) || []; } - - _printComment(comment, skipNewLines) { - if (!this.format.shouldPrintComment(comment.value)) return; - if (comment.ignore) return; - if (this._printedComments.has(comment)) return; - + _shouldPrintComment(comment) { + if (comment.ignore) return 0; + if (this._printedComments.has(comment)) return 0; + if (this._noLineTerminator && (HAS_NEWLINE.test(comment.value) || HAS_BlOCK_COMMENT_END.test(comment.value))) { + return 2; + } this._printedComments.add(comment); - - if (comment.start != null) { - if (this._printedCommentStarts[comment.start]) return; - this._printedCommentStarts[comment.start] = true; + if (!this.format.shouldPrintComment(comment.value)) { + return 0; } - + return 1; + } + _printComment(comment, skipNewLines) { + const noLineTerminator = this._noLineTerminator; const isBlockComment = comment.type === "CommentBlock"; - const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator; - if (printNewLines && this._buf.hasContent()) this.newline(1); - if (!this.endsWith("[") && !this.endsWith("{")) this.space(); - let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`; - - if (isBlockComment && this.format.indent.adjustMultilineComment) { - var _comment$loc; - - const offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column; - - if (offset) { - const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); + const printNewLines = isBlockComment && skipNewLines !== 1 && !this._noLineTerminator; + if (printNewLines && this._buf.hasContent() && skipNewLines !== 2) { + this.newline(1); + } + const lastCharCode = this.getLastChar(); + if (lastCharCode !== 91 && lastCharCode !== 123) { + this.space(); + } + let val; + if (isBlockComment) { + val = `/*${comment.value}*/`; + if (this.format.indent.adjustMultilineComment) { + var _comment$loc; + const offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column; + if (offset) { + const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); + val = val.replace(newlineRegex, "\n"); + } + let indentSize = this.format.retainLines ? 0 : this._buf.getCurrentColumn(); + if (this._shouldIndent(47) || this.format.retainLines) { + indentSize += this._getIndent(); + } + val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`); } - - const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn()); - val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`); + } else if (!noLineTerminator) { + val = `//${comment.value}`; + } else { + val = `/*${comment.value}*/`; + } + if (this.endsWith(47)) this._space(); + this.source("start", comment.loc); + this._append(val, isBlockComment); + if (!isBlockComment && !noLineTerminator) { + this.newline(1, true); + } + if (printNewLines && skipNewLines !== 3) { + this.newline(1); } - - if (this.endsWith("/")) this._space(); - this.withSource("start", comment.loc, () => { - this._append(val); - }); - if (printNewLines) this.newline(1); } - - _printComments(comments, inlinePureAnnotation) { - if (!(comments != null && comments.length)) return; - - if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) { - this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n")); - } else { - for (const comment of comments) { - this._printComment(comment); + _printComments(type, comments, node, parent, lineOffset = 0) { + const nodeLoc = node.loc; + const len = comments.length; + let hasLoc = !!nodeLoc; + const nodeStartLine = hasLoc ? nodeLoc.start.line : 0; + const nodeEndLine = hasLoc ? nodeLoc.end.line : 0; + let lastLine = 0; + let leadingCommentNewline = 0; + const maybeNewline = this._noLineTerminator ? function () {} : this.newline.bind(this); + for (let i = 0; i < len; i++) { + const comment = comments[i]; + const shouldPrint = this._shouldPrintComment(comment); + if (shouldPrint === 2) { + hasLoc = false; + break; + } + if (hasLoc && comment.loc && shouldPrint === 1) { + const commentStartLine = comment.loc.start.line; + const commentEndLine = comment.loc.end.line; + if (type === 0) { + let offset = 0; + if (i === 0) { + if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine != commentEndLine)) { + offset = leadingCommentNewline = 1; + } + } else { + offset = commentStartLine - lastLine; + } + lastLine = commentEndLine; + maybeNewline(offset); + this._printComment(comment, 1); + if (i + 1 === len) { + maybeNewline(Math.max(nodeStartLine - lastLine, leadingCommentNewline)); + lastLine = nodeStartLine; + } + } else if (type === 1) { + const offset = commentStartLine - (i === 0 ? nodeStartLine : lastLine); + lastLine = commentEndLine; + maybeNewline(offset); + this._printComment(comment, 1); + if (i + 1 === len) { + maybeNewline(Math.min(1, nodeEndLine - lastLine)); + lastLine = nodeEndLine; + } + } else { + const offset = commentStartLine - (i === 0 ? nodeEndLine - lineOffset : lastLine); + lastLine = commentEndLine; + maybeNewline(offset); + this._printComment(comment, 1); + } + } else { + hasLoc = false; + if (shouldPrint !== 1) { + continue; + } + if (len === 1) { + const singleLine = comment.loc ? comment.loc.start.line === comment.loc.end.line : !HAS_NEWLINE.test(comment.value); + const shouldSkipNewline = singleLine && !isStatement(node) && !isClassBody(parent) && !isTSInterfaceBody(parent) && !isTSEnumDeclaration(parent); + if (type === 0) { + this._printComment(comment, shouldSkipNewline && node.type !== "ObjectExpression" || singleLine && isFunction(parent, { + body: node + }) ? 1 : 0); + } else if (shouldSkipNewline && type === 2) { + this._printComment(comment, 1); + } else { + this._printComment(comment, 0); + } + } else if (type === 1 && !(node.type === "ObjectExpression" && node.properties.length > 1) && node.type !== "ClassBody" && node.type !== "TSInterfaceBody") { + this._printComment(comment, i === 0 ? 2 : i === len - 1 ? 3 : 0); + } else { + this._printComment(comment, 0); + } } } - } - - printAssertions(node) { - var _node$assertions; - - if ((_node$assertions = node.assertions) != null && _node$assertions.length) { - this.space(); - this.word("assert"); - this.space(); - this.token("{"); - this.space(); - this.printList(node.assertions, node); - this.space(); - this.token("}"); + if (type === 2 && hasLoc && lastLine) { + this._lastCommentLine = lastLine; } } - } - Object.assign(Printer.prototype, generatorFunctions); { Printer.prototype.Noop = function Noop() {}; } var _default = Printer; exports.default = _default; - function commaSeparator() { - this.token(","); + this.tokenChar(44); this.space(); -} \ No newline at end of file +} + +//# sourceMappingURL=printer.js.map diff --git a/node_modules/@babel/generator/lib/printer.js.map b/node_modules/@babel/generator/lib/printer.js.map new file mode 100644 index 00000000..00a1c4f8 --- /dev/null +++ b/node_modules/@babel/generator/lib/printer.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_buffer","require","n","_t","generatorFunctions","isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumDeclaration","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","NON_DECIMAL_LITERAL","PURE_ANNOTATION_RE","HAS_NEWLINE","HAS_BlOCK_COMMENT_END","needsParens","Printer","constructor","format","map","inForStatementInitCounter","_printStack","_indent","_indentChar","_indentRepeat","_insideAux","_parenPushNewlineState","_noLineTerminator","_printAuxAfterOnNextUserNode","_printedComments","Set","_endsWithInteger","_endsWithWord","_lastCommentLine","_endsWithInnerRaw","_indentInnerComments","_buf","Buffer","indent","style","charCodeAt","length","_inputMap","generate","ast","print","_maybeAddAuxComment","get","compact","concise","dedent","semicolon","force","_appendChar","_queue","rightBrace","node","minified","removeLastSemicolon","sourceWithOffset","loc","token","rightParens","space","_space","hasContent","lastCp","getLastChar","word","str","noLineTerminatorAfter","_maybePrintInnerComments","endsWith","_append","number","Number","isInteger","test","maybeNewline","lastChar","strFirst","tokenChar","char","newline","i","retainLines","getNewlineCount","j","_newline","endsWithCharAndNewline","removeTrailingNewline","exactSource","cb","_catchUp","source","prop","lineOffset","columnOffset","withSource","sourceIdentifierName","identifierName","pos","_canMarkIdName","sourcePosition","_sourcePosition","identifierNamePos","_maybeAddParen","_maybeIndent","append","_maybeAddParenChar","appendChar","queue","firstChar","queueIndentation","_getIndent","_shouldIndent","parenPushNewlineState","printed","len","cha","chaPost","slice","catchUp","line","count","getCurrentLine","_loc$prop","printTerminatorless","parent","isLabel","terminatorState","trailingCommentsLineOffset","forceParens","_node$extra","nodeType","type","oldConcise","_compact","printMethod","undefined","ReferenceError","JSON","stringify","name","push","oldInAux","shouldPrintParens","retainFunctionParens","extra","parenthesized","_printLeadingComments","bind","_printTrailingComments","pop","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","auxiliaryCommentBefore","_printComment","value","auxiliaryCommentAfter","getPossibleRaw","raw","rawValue","printJoin","nodes","opts","_nodes$0$loc","startLine","start","newlineOpts","addNewlines","nextNodeStartLine","separator","statement","_printNewline","iterator","_nextNode$loc","nextNode","printAndIndentOnComments","leadingComments","printBlock","body","innerComments","trailingComments","_printComments","comments","printInnerComments","hasSpace","printedCommentsCount","size","noIndentInnerCommentsHere","printSequence","_opts$indent","printList","items","commaSeparator","newLine","lastCommentLine","offset","_shouldPrintComment","ignore","has","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","lastCharCode","val","adjustMultilineComment","_comment$loc","column","newlineRegex","RegExp","replace","indentSize","getCurrentColumn","repeat","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","end","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","Object","assign","prototype","Noop","_default","exports","default"],"sources":["../src/printer.ts"],"sourcesContent":["import Buffer, { type Pos } from \"./buffer\";\nimport type { Loc } from \"./buffer\";\nimport * as n from \"./node\";\nimport type * as t from \"@babel/types\";\nimport {\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumDeclaration,\n} from \"@babel/types\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport * as generatorFunctions from \"./generators\";\nimport type SourceMap from \"./source-map\";\nimport * as charCodes from \"charcodes\";\nimport type { TraceMap } from \"@jridgewell/trace-mapping\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\nconst PURE_ANNOTATION_RE = /^\\s*[@#]__PURE__\\s*$/;\nconst HAS_NEWLINE = /[\\n\\r\\u2028\\u2029]/;\nconst HAS_BlOCK_COMMENT_END = /\\*\\//;\n\nconst { needsParens } = n;\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n ALL,\n LEADING,\n TRAILING,\n}\n\nconst enum PRINT_COMMENT_HINT {\n SKIP,\n ALLOW,\n DEFER,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n retainLines: boolean;\n retainFunctionParens: boolean;\n comments: boolean;\n auxiliaryCommentBefore: string;\n auxiliaryCommentAfter: string;\n compact: boolean | \"auto\";\n minified: boolean;\n concise: boolean;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n recordAndTupleSyntaxType: RecordAndTuplePluginOptions[\"syntaxType\"];\n jsescOption: jsescOptions;\n /**\n * @deprecated Removed in Babel 8, use `jsescOption` instead\n */\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n};\n\ninterface AddNewlinesOptions {\n addNewlines(leading: boolean, node: t.Node): number;\n nextNodeStartLine: number;\n}\n\ninterface PrintSequenceOptions extends Partial {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer) => void;\n iterator?: (node: t.Node, index: number) => void;\n statement?: boolean;\n indent?: boolean;\n}\n\nexport type PrintJoinOptions = PrintListOptions & PrintSequenceOptions;\nclass Printer {\n constructor(format: Format, map: SourceMap) {\n this.format = format;\n this._buf = new Buffer(map);\n\n this._indentChar = format.indent.style.charCodeAt(0);\n this._indentRepeat = format.indent.style.length;\n\n this._inputMap = map?._inputMap;\n }\n declare _inputMap: TraceMap;\n\n declare format: Format;\n inForStatementInitCounter: number = 0;\n\n declare _buf: Buffer;\n _printStack: Array = [];\n _indent: number = 0;\n _indentChar: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _parenPushNewlineState: { printed: boolean } | null = null;\n _noLineTerminator: boolean = false;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set();\n _endsWithInteger = false;\n _endsWithWord = false;\n _lastCommentLine = 0;\n _endsWithInnerRaw: boolean = false;\n _indentInnerComments: boolean = true;\n\n generate(ast: t.Node) {\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent++;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent--;\n }\n\n /**\n * Add a semicolon to the buffer.\n */\n\n semicolon(force: boolean = false): void {\n this._maybeAddAuxComment();\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n this._noLineTerminator = false;\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(node: t.Node): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.token(\"}\");\n }\n\n rightParens(node: t.Node): void {\n this.sourceWithOffset(\"end\", node.loc, 0, -1);\n this.token(\")\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this.format.compact) return;\n\n if (force) {\n this._space();\n } else if (this._buf.hasContent()) {\n const lastCp = this.getLastChar();\n if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string, noLineTerminatorAfter: boolean = false): void {\n this._maybePrintInnerComments();\n\n // prevent concatenating words and creating // comment out of division and regex\n if (\n this._endsWithWord ||\n (str.charCodeAt(0) === charCodes.slash && this.endsWith(charCodes.slash))\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, false);\n\n this._endsWithWord = true;\n this._noLineTerminator = noLineTerminatorAfter;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string): void {\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted\n // immediately after them.\n this._endsWithInteger =\n Number.isInteger(+str) &&\n !NON_DECIMAL_LITERAL.test(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot;\n }\n\n /**\n * Writes a simple token.\n */\n token(str: string, maybeNewline = false): void {\n this._maybePrintInnerComments();\n\n const lastChar = this.getLastChar();\n const strFirst = str.charCodeAt(0);\n if (\n (lastChar === charCodes.exclamationMark &&\n // space is mandatory to avoid outputting - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab6382..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpY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GVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7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lmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSB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9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1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mlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e29..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd0..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js b/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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. - * * Neither the name of Google Inc. nor the names of its - * contributors may 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 - * OWNER 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. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js b/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js b/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js b/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc280..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7fb..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53f..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/util.js b/node_modules/@babel/generator/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e452..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/@babel/generator/node_modules/source-map/package.json b/node_modules/@babel/generator/node_modules/source-map/package.json deleted file mode 100644 index ec465dfa..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/package.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "_from": "source-map@^0.5.0", - "_id": "source-map@0.5.7", - "_inBundle": false, - "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "_location": "/@babel/generator/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "source-map@^0.5.0", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "^0.5.0", - "saveSpec": null, - "fetchSpec": "^0.5.0" - }, - "_requiredBy": [ - "/@babel/generator" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc", - "_spec": "source-map@^0.5.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/generator", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "deprecated": false, - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/node_modules/@babel/generator/node_modules/source-map/source-map.js b/node_modules/@babel/generator/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/@babel/generator/package.json b/node_modules/@babel/generator/package.json index b2a511ad..0e7441b4 100644 --- a/node_modules/@babel/generator/package.json +++ b/node_modules/@babel/generator/package.json @@ -1,65 +1,37 @@ { - "_from": "@babel/generator@^7.13.9", - "_id": "@babel/generator@7.13.9", - "_inBundle": false, - "_integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", - "_location": "/@babel/generator", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/generator@^7.13.9", - "name": "@babel/generator", - "escapedName": "@babel%2fgenerator", - "scope": "@babel", - "rawSpec": "^7.13.9", - "saveSpec": null, - "fetchSpec": "^7.13.9" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "_shasum": "3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39", - "_spec": "@babel/generator@^7.13.9", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/core", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.13.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "deprecated": false, + "name": "@babel/generator", + "version": "7.22.3", "description": "Turns an AST into code.", - "devDependencies": { - "@babel/helper-fixtures": "7.13.9", - "@babel/parser": "7.13.9", - "@types/jsesc": "^2.5.0", - "@types/lodash": "^4.14.150", - "@types/source-map": "^0.5.0" - }, - "files": [ - "lib" - ], - "homepage": "https://babel.dev/docs/en/next/babel-generator", + "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", - "main": "lib/index.js", - "name": "@babel/generator", "publishConfig": { "access": "public" }, "repository": { "type": "git", - "url": "git+https://github.com/babel/babel.git", + "url": "https://github.com/babel/babel.git", "directory": "packages/babel-generator" }, - "version": "7.13.9" -} + "homepage": "https://babel.dev/docs/en/next/babel-generator", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen", + "main": "./lib/index.js", + "files": [ + "lib" + ], + "dependencies": { + "@babel/types": "^7.22.3", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "devDependencies": { + "@babel/helper-fixtures": "^7.21.5", + "@babel/parser": "^7.22.3", + "@types/jsesc": "^2.5.0", + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/README.md b/node_modules/@babel/helper-compilation-targets/README.md new file mode 100644 index 00000000..29f043b9 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/README.md @@ -0,0 +1,19 @@ +# @babel/helper-compilation-targets + +> Helper functions on Babel compilation targets + +See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/en/babel-helper-compilation-targets) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-compilation-targets +``` + +or using yarn: + +```sh +yarn add @babel/helper-compilation-targets +``` diff --git a/node_modules/@babel/helper-compilation-targets/lib/debug.js b/node_modules/@babel/helper-compilation-targets/lib/debug.js index 7e9e4a20..0fefa43c 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/debug.js +++ b/node_modules/@babel/helper-compilation-targets/lib/debug.js @@ -4,30 +4,25 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getInclusionReasons = getInclusionReasons; - +var _semver = require("semver"); var _pretty = require("./pretty"); - var _utils = require("./utils"); - -const semver = require("semver"); - function getInclusionReasons(item, targetVersions, list) { const minVersions = list[item] || {}; return Object.keys(targetVersions).reduce((result, env) => { const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env); const targetVersion = targetVersions[env]; - if (!minVersion) { result[env] = (0, _pretty.prettifyVersion)(targetVersion); } else { const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env); const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env); - - if (!targetIsUnreleased && (minIsUnreleased || semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) { + if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) { result[env] = (0, _pretty.prettifyVersion)(targetVersion); } } - return result; }, {}); -} \ No newline at end of file +} + +//# sourceMappingURL=debug.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/debug.js.map b/node_modules/@babel/helper-compilation-targets/lib/debug.js.map new file mode 100644 index 00000000..87f05f44 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/debug.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_semver","require","_pretty","_utils","getInclusionReasons","item","targetVersions","list","minVersions","Object","keys","reduce","result","env","minVersion","getLowestImplementedVersion","targetVersion","prettifyVersion","minIsUnreleased","isUnreleasedVersion","targetIsUnreleased","semver","lt","toString","semverify"],"sources":["../src/debug.ts"],"sourcesContent":["import semver from \"semver\";\nimport { prettifyVersion } from \"./pretty\";\nimport {\n semverify,\n isUnreleasedVersion,\n getLowestImplementedVersion,\n} from \"./utils\";\nimport type { Target, Targets } from \"./types\";\n\nexport function getInclusionReasons(\n item: string,\n targetVersions: Targets,\n list: { [key: string]: Targets },\n) {\n const minVersions = list[item] || {};\n\n return (Object.keys(targetVersions) as Target[]).reduce((result, env) => {\n const minVersion = getLowestImplementedVersion(minVersions, env);\n const targetVersion = targetVersions[env];\n\n if (!minVersion) {\n result[env] = prettifyVersion(targetVersion);\n } else {\n const minIsUnreleased = isUnreleasedVersion(minVersion, env);\n const targetIsUnreleased = isUnreleasedVersion(targetVersion, env);\n\n if (\n !targetIsUnreleased &&\n (minIsUnreleased ||\n semver.lt(targetVersion.toString(), semverify(minVersion)))\n ) {\n result[env] = prettifyVersion(targetVersion);\n }\n }\n\n return result;\n }, {} as Partial>);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOO,SAASG,mBAAmBA,CACjCC,IAAY,EACZC,cAAuB,EACvBC,IAAgC,EAChC;EACA,MAAMC,WAAW,GAAGD,IAAI,CAACF,IAAI,CAAC,IAAI,CAAC,CAAC;EAEpC,OAAQI,MAAM,CAACC,IAAI,CAACJ,cAAc,CAAC,CAAcK,MAAM,CAAC,CAACC,MAAM,EAAEC,GAAG,KAAK;IACvE,MAAMC,UAAU,GAAG,IAAAC,kCAA2B,EAACP,WAAW,EAAEK,GAAG,CAAC;IAChE,MAAMG,aAAa,GAAGV,cAAc,CAACO,GAAG,CAAC;IAEzC,IAAI,CAACC,UAAU,EAAE;MACfF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;IAC9C,CAAC,MAAM;MACL,MAAME,eAAe,GAAG,IAAAC,0BAAmB,EAACL,UAAU,EAAED,GAAG,CAAC;MAC5D,MAAMO,kBAAkB,GAAG,IAAAD,0BAAmB,EAACH,aAAa,EAAEH,GAAG,CAAC;MAElE,IACE,CAACO,kBAAkB,KAClBF,eAAe,IACdG,OAAM,CAACC,EAAE,CAACN,aAAa,CAACO,QAAQ,CAAC,CAAC,EAAE,IAAAC,gBAAS,EAACV,UAAU,CAAC,CAAC,CAAC,EAC7D;QACAF,MAAM,CAACC,GAAG,CAAC,GAAG,IAAAI,uBAAe,EAACD,aAAa,CAAC;MAC9C;IACF;IAEA,OAAOJ,MAAM;EACf,CAAC,EAAE,CAAC,CAAoC,CAAC;AAC3C"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js index f1832da3..7b928314 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +++ b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js @@ -3,53 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.targetsSupported = targetsSupported; -exports.isRequired = isRequired; exports.default = filterItems; - -var _plugins = _interopRequireDefault(require("@babel/compat-data/plugins")); - +exports.isRequired = isRequired; +exports.targetsSupported = targetsSupported; +var _semver = require("semver"); +var _plugins = require("@babel/compat-data/plugins"); var _utils = require("./utils"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const semver = require("semver"); - function targetsSupported(target, support) { const targetEnvironments = Object.keys(target); - if (targetEnvironments.length === 0) { return false; } - const unsupportedEnvironments = targetEnvironments.filter(environment => { const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment); - if (!lowestImplementedVersion) { return true; } - const lowestTargetedVersion = target[environment]; - if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) { return false; } - if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) { return true; } - - if (!semver.valid(lowestTargetedVersion.toString())) { + if (!_semver.valid(lowestTargetedVersion.toString())) { throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)"); } - - return semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString()); + return _semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString()); }); return unsupportedEnvironments.length === 0; } - function isRequired(name, targets, { - compatData = _plugins.default, + compatData = _plugins, includes, excludes } = {}) { @@ -57,7 +42,6 @@ function isRequired(name, targets, { if (includes != null && includes.has(name)) return true; return !targetsSupported(targets, compatData[name]); } - function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) { const result = new Set(); const options = { @@ -65,26 +49,23 @@ function filterItems(list, includes, excludes, targets, defaultIncludes, default includes, excludes }; - for (const item in list) { if (isRequired(item, targets, options)) { result.add(item); } else if (pluginSyntaxMap) { const shippedProposalsSyntax = pluginSyntaxMap.get(item); - if (shippedProposalsSyntax) { result.add(shippedProposalsSyntax); } } } - if (defaultIncludes) { defaultIncludes.forEach(item => !excludes.has(item) && result.add(item)); } - if (defaultExcludes) { defaultExcludes.forEach(item => !includes.has(item) && result.delete(item)); } - return result; -} \ No newline at end of file +} + +//# sourceMappingURL=filter-items.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map new file mode 100644 index 00000000..20965f66 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_semver","require","_plugins","_utils","targetsSupported","target","support","targetEnvironments","Object","keys","length","unsupportedEnvironments","filter","environment","lowestImplementedVersion","getLowestImplementedVersion","lowestTargetedVersion","isUnreleasedVersion","semver","valid","toString","Error","gt","semverify","isRequired","name","targets","compatData","pluginsCompatData","includes","excludes","has","filterItems","list","defaultIncludes","defaultExcludes","pluginSyntaxMap","result","Set","options","item","add","shippedProposalsSyntax","get","forEach","delete"],"sources":["../src/filter-items.ts"],"sourcesContent":["import semver from \"semver\";\n\nimport pluginsCompatData from \"@babel/compat-data/plugins\";\n\nimport type { Targets } from \"./types\";\nimport {\n getLowestImplementedVersion,\n isUnreleasedVersion,\n semverify,\n} from \"./utils\";\n\nexport function targetsSupported(target: Targets, support: Targets) {\n const targetEnvironments = Object.keys(target) as Array;\n\n if (targetEnvironments.length === 0) {\n return false;\n }\n\n const unsupportedEnvironments = targetEnvironments.filter(environment => {\n const lowestImplementedVersion = getLowestImplementedVersion(\n support,\n environment,\n );\n\n // Feature is not implemented in that environment\n if (!lowestImplementedVersion) {\n return true;\n }\n\n const lowestTargetedVersion = target[environment];\n\n // If targets has unreleased value as a lowest version, then don't require a plugin.\n if (isUnreleasedVersion(lowestTargetedVersion, environment)) {\n return false;\n }\n\n // Include plugin if it is supported in the unreleased environment, which wasn't specified in targets\n if (isUnreleasedVersion(lowestImplementedVersion, environment)) {\n return true;\n }\n\n if (!semver.valid(lowestTargetedVersion.toString())) {\n throw new Error(\n `Invalid version passed for target \"${environment}\": \"${lowestTargetedVersion}\". ` +\n \"Versions must be in semver format (major.minor.patch)\",\n );\n }\n\n return semver.gt(\n semverify(lowestImplementedVersion),\n lowestTargetedVersion.toString(),\n );\n });\n\n return unsupportedEnvironments.length === 0;\n}\n\nexport function isRequired(\n name: string,\n targets: Targets,\n {\n compatData = pluginsCompatData,\n includes,\n excludes,\n }: {\n compatData?: { [feature: string]: Targets };\n includes?: Set;\n excludes?: Set;\n } = {},\n) {\n if (excludes?.has(name)) return false;\n if (includes?.has(name)) return true;\n return !targetsSupported(targets, compatData[name]);\n}\n\nexport default function filterItems(\n list: { [feature: string]: Targets },\n includes: Set,\n excludes: Set,\n targets: Targets,\n defaultIncludes: Array | null,\n defaultExcludes?: Array | null,\n pluginSyntaxMap?: Map,\n) {\n const result = new Set();\n const options = { compatData: list, includes, excludes };\n\n for (const item in list) {\n if (isRequired(item, targets, options)) {\n result.add(item);\n } else if (pluginSyntaxMap) {\n const shippedProposalsSyntax = pluginSyntaxMap.get(item);\n\n if (shippedProposalsSyntax) {\n result.add(shippedProposalsSyntax);\n }\n }\n }\n\n if (defaultIncludes) {\n defaultIncludes.forEach(item => !excludes.has(item) && result.add(item));\n }\n\n if (defaultExcludes) {\n defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAMO,SAASG,gBAAgBA,CAACC,MAAe,EAAEC,OAAgB,EAAE;EAClE,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,IAAI,CAACJ,MAAM,CAAyB;EAEtE,IAAIE,kBAAkB,CAACG,MAAM,KAAK,CAAC,EAAE;IACnC,OAAO,KAAK;EACd;EAEA,MAAMC,uBAAuB,GAAGJ,kBAAkB,CAACK,MAAM,CAACC,WAAW,IAAI;IACvE,MAAMC,wBAAwB,GAAG,IAAAC,kCAA2B,EAC1DT,OAAO,EACPO,WACF,CAAC;IAGD,IAAI,CAACC,wBAAwB,EAAE;MAC7B,OAAO,IAAI;IACb;IAEA,MAAME,qBAAqB,GAAGX,MAAM,CAACQ,WAAW,CAAC;IAGjD,IAAI,IAAAI,0BAAmB,EAACD,qBAAqB,EAAEH,WAAW,CAAC,EAAE;MAC3D,OAAO,KAAK;IACd;IAGA,IAAI,IAAAI,0BAAmB,EAACH,wBAAwB,EAAED,WAAW,CAAC,EAAE;MAC9D,OAAO,IAAI;IACb;IAEA,IAAI,CAACK,OAAM,CAACC,KAAK,CAACH,qBAAqB,CAACI,QAAQ,CAAC,CAAC,CAAC,EAAE;MACnD,MAAM,IAAIC,KAAK,CACZ,sCAAqCR,WAAY,OAAMG,qBAAsB,KAAI,GAChF,uDACJ,CAAC;IACH;IAEA,OAAOE,OAAM,CAACI,EAAE,CACd,IAAAC,gBAAS,EAACT,wBAAwB,CAAC,EACnCE,qBAAqB,CAACI,QAAQ,CAAC,CACjC,CAAC;EACH,CAAC,CAAC;EAEF,OAAOT,uBAAu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;IACnBA,eAAe,CAACS,OAAO,CAACJ,IAAI,IAAI,CAACX,QAAQ,CAACE,GAAG,CAACS,IAAI,CAAC,IAAIH,MAAM,CAACQ,MAAM,CAACL,IAAI,CAAC,CAAC;EAC7E;EAEA,OAAOH,MAAM;AACf"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/index.js b/node_modules/@babel/helper-compilation-targets/lib/index.js index 111b3eaf..e935dba8 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/index.js +++ b/node_modules/@babel/helper-compilation-targets/lib/index.js @@ -3,24 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.isBrowsersQueryValid = isBrowsersQueryValid; -exports.default = getTargets; -Object.defineProperty(exports, "unreleasedLabels", { - enumerable: true, - get: function () { - return _targets.unreleasedLabels; - } -}); Object.defineProperty(exports, "TargetNames", { enumerable: true, get: function () { return _options.TargetNames; } }); -Object.defineProperty(exports, "prettifyTargets", { +exports.default = getTargets; +Object.defineProperty(exports, "filterItems", { enumerable: true, get: function () { - return _pretty.prettifyTargets; + return _filterItems.default; } }); Object.defineProperty(exports, "getInclusionReasons", { @@ -29,108 +22,86 @@ Object.defineProperty(exports, "getInclusionReasons", { return _debug.getInclusionReasons; } }); -Object.defineProperty(exports, "filterItems", { +exports.isBrowsersQueryValid = isBrowsersQueryValid; +Object.defineProperty(exports, "isRequired", { enumerable: true, get: function () { - return _filterItems.default; + return _filterItems.isRequired; } }); -Object.defineProperty(exports, "isRequired", { +Object.defineProperty(exports, "prettifyTargets", { enumerable: true, get: function () { - return _filterItems.isRequired; + return _pretty.prettifyTargets; } }); - +Object.defineProperty(exports, "unreleasedLabels", { + enumerable: true, + get: function () { + return _targets.unreleasedLabels; + } +}); +var _browserslist = require("browserslist"); var _helperValidatorOption = require("@babel/helper-validator-option"); - -var _nativeModules = _interopRequireDefault(require("@babel/compat-data/native-modules")); - +var _nativeModules = require("@babel/compat-data/native-modules"); +var _lruCache = require("lru-cache"); var _utils = require("./utils"); - var _targets = require("./targets"); - var _options = require("./options"); - var _pretty = require("./pretty"); - var _debug = require("./debug"); - -var _filterItems = _interopRequireWildcard(require("./filter-items")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const browserslist = require("browserslist"); - -const ESM_SUPPORT = _nativeModules.default["es6.module"]; +var _filterItems = require("./filter-items"); +const ESM_SUPPORT = _nativeModules["es6.module"]; const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets"); - function validateTargetNames(targets) { const validTargets = Object.keys(_options.TargetNames); - for (const target of Object.keys(targets)) { if (!(target in _options.TargetNames)) { throw new Error(v.formatMessage(`'${target}' is not a valid target - Did you mean '${(0, _helperValidatorOption.findSuggestion)(target, validTargets)}'?`)); } } - return targets; } - function isBrowsersQueryValid(browsers) { return typeof browsers === "string" || Array.isArray(browsers) && browsers.every(b => typeof b === "string"); } - function validateBrowsers(browsers) { v.invariant(browsers === undefined || isBrowsersQueryValid(browsers), `'${String(browsers)}' is not a valid browserslist query`); return browsers; } - function getLowestVersions(browsers) { return browsers.reduce((all, browser) => { const [browserName, browserVersion] = browser.split(" "); - const normalizedBrowserName = _targets.browserNameMap[browserName]; - - if (!normalizedBrowserName) { + const target = _targets.browserNameMap[browserName]; + if (!target) { return all; } - try { const splitVersion = browserVersion.split("-")[0].toLowerCase(); - const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, browserName); - - if (!all[normalizedBrowserName]) { - all[normalizedBrowserName] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion); + const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, target); + if (!all[target]) { + all[target] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion); return all; } - - const version = all[normalizedBrowserName]; - const isUnreleased = (0, _utils.isUnreleasedVersion)(version, browserName); - + const version = all[target]; + const isUnreleased = (0, _utils.isUnreleasedVersion)(version, target); if (isUnreleased && isSplitUnreleased) { - all[normalizedBrowserName] = (0, _utils.getLowestUnreleased)(version, splitVersion, browserName); + all[target] = (0, _utils.getLowestUnreleased)(version, splitVersion, target); } else if (isUnreleased) { - all[normalizedBrowserName] = (0, _utils.semverify)(splitVersion); + all[target] = (0, _utils.semverify)(splitVersion); } else if (!isUnreleased && !isSplitUnreleased) { const parsedBrowserVersion = (0, _utils.semverify)(splitVersion); - all[normalizedBrowserName] = (0, _utils.semverMin)(version, parsedBrowserVersion); + all[target] = (0, _utils.semverMin)(version, parsedBrowserVersion); } } catch (e) {} - return all; }, {}); } - function outputDecimalWarning(decimalTargets) { if (!decimalTargets.length) { return; } - console.warn("Warning, the following targets are using a decimal version:\n"); decimalTargets.forEach(({ target, @@ -141,7 +112,6 @@ We recommend using a string for minor/patch versions to avoid numbers like 6.10 getting parsed as 6.1, which can lead to unexpected behavior. `); } - function semverifyTarget(target, value) { try { return (0, _utils.semverify)(value); @@ -149,108 +119,102 @@ function semverifyTarget(target, value) { throw new Error(v.formatMessage(`'${value}' is not a valid value for 'targets.${target}'.`)); } } - -const targetParserMap = { - __default(target, value) { - const version = (0, _utils.isUnreleasedVersion)(value, target) ? value.toLowerCase() : semverifyTarget(target, value); - return [target, version]; - }, - - node(target, value) { - const parsed = value === true || value === "current" ? process.versions.node : semverifyTarget(target, value); - return [target, parsed]; - } - -}; - +function nodeTargetParser(value) { + const parsed = value === true || value === "current" ? process.versions.node : semverifyTarget("node", value); + return ["node", parsed]; +} +function defaultTargetParser(target, value) { + const version = (0, _utils.isUnreleasedVersion)(value, target) ? value.toLowerCase() : semverifyTarget(target, value); + return [target, version]; +} function generateTargets(inputTargets) { const input = Object.assign({}, inputTargets); delete input.esmodules; delete input.browsers; return input; } - -function resolveTargets(queries) { - const resolved = browserslist(queries, { - mobileToDesktop: true +function resolveTargets(queries, env) { + const resolved = _browserslist(queries, { + mobileToDesktop: true, + env }); return getLowestVersions(resolved); } - +const targetsCache = new _lruCache({ + max: 64 +}); +function resolveTargetsCached(queries, env) { + const cacheKey = typeof queries === "string" ? queries : queries.join() + env; + let cached = targetsCache.get(cacheKey); + if (!cached) { + cached = resolveTargets(queries, env); + targetsCache.set(cacheKey, cached); + } + return Object.assign({}, cached); +} function getTargets(inputTargets = {}, options = {}) { - var _browsers; - + var _browsers, _browsers2; let { browsers, esmodules } = inputTargets; + const { + configPath = "." + } = options; validateBrowsers(browsers); const input = generateTargets(inputTargets); let targets = validateTargetNames(input); const shouldParseBrowsers = !!browsers; const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0; const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets; - if (!browsers && shouldSearchForConfig) { - browsers = browserslist.loadConfig({ + browsers = _browserslist.loadConfig({ config: options.configFile, - path: options.configPath, + path: configPath, env: options.browserslistEnv }); - if (browsers == null) { { browsers = []; } } } - if (esmodules && (esmodules !== "intersect" || !((_browsers = browsers) != null && _browsers.length))) { browsers = Object.keys(ESM_SUPPORT).map(browser => `${browser} >= ${ESM_SUPPORT[browser]}`).join(", "); esmodules = false; } - - if (browsers) { - const queryBrowsers = resolveTargets(browsers); - + if ((_browsers2 = browsers) != null && _browsers2.length) { + const queryBrowsers = resolveTargetsCached(browsers, options.browserslistEnv); if (esmodules === "intersect") { for (const browser of Object.keys(queryBrowsers)) { const version = queryBrowsers[browser]; - - if (ESM_SUPPORT[browser]) { - queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version, (0, _utils.semverify)(ESM_SUPPORT[browser]), browser); + const esmSupportVersion = ESM_SUPPORT[browser]; + if (esmSupportVersion) { + queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version, (0, _utils.semverify)(esmSupportVersion), browser); } else { delete queryBrowsers[browser]; } } } - targets = Object.assign(queryBrowsers, targets); } - const result = {}; const decimalWarnings = []; - for (const target of Object.keys(targets).sort()) { - var _targetParserMap$targ; - const value = targets[target]; - if (typeof value === "number" && value % 1 !== 0) { decimalWarnings.push({ target, value }); } - - const parser = (_targetParserMap$targ = targetParserMap[target]) != null ? _targetParserMap$targ : targetParserMap.__default; - const [parsedTarget, parsedValue] = parser(target, value); - + const [parsedTarget, parsedValue] = target === "node" ? nodeTargetParser(value) : defaultTargetParser(target, value); if (parsedValue) { result[parsedTarget] = parsedValue; } } - outputDecimalWarning(decimalWarnings); return result; -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/index.js.map b/node_modules/@babel/helper-compilation-targets/lib/index.js.map new file mode 100644 index 00000000..eaddda9c --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_browserslist","require","_helperValidatorOption","_nativeModules","_lruCache","_utils","_targets","_options","_pretty","_debug","_filterItems","ESM_SUPPORT","browserModulesData","v","OptionValidator","validateTargetNames","targets","validTargets","Object","keys","TargetNames","target","Error","formatMessage","findSuggestion","isBrowsersQueryValid","browsers","Array","isArray","every","b","validateBrowsers","invariant","undefined","String","getLowestVersions","reduce","all","browser","browserName","browserVersion","split","browserNameMap","splitVersion","toLowerCase","isSplitUnreleased","isUnreleasedVersion","semverify","version","isUnreleased","getLowestUnreleased","parsedBrowserVersion","semverMin","e","outputDecimalWarning","decimalTargets","length","console","warn","forEach","value","semverifyTarget","error","nodeTargetParser","parsed","process","versions","node","defaultTargetParser","generateTargets","inputTargets","input","assign","esmodules","resolveTargets","queries","env","resolved","browserslist","mobileToDesktop","targetsCache","LruCache","max","resolveTargetsCached","cacheKey","join","cached","get","set","getTargets","options","_browsers","_browsers2","configPath","shouldParseBrowsers","hasTargets","shouldSearchForConfig","ignoreBrowserslistConfig","loadConfig","config","configFile","path","browserslistEnv","map","queryBrowsers","esmSupportVersion","getHighestUnreleased","result","decimalWarnings","sort","push","parsedTarget","parsedValue"],"sources":["../src/index.ts"],"sourcesContent":["import browserslist from \"browserslist\";\nimport { findSuggestion } from \"@babel/helper-validator-option\";\nimport browserModulesData from \"@babel/compat-data/native-modules\";\nimport LruCache from \"lru-cache\";\n\nimport {\n semverify,\n semverMin,\n isUnreleasedVersion,\n getLowestUnreleased,\n getHighestUnreleased,\n} from \"./utils\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { browserNameMap } from \"./targets\";\nimport { TargetNames } from \"./options\";\nimport type {\n Target,\n Targets,\n InputTargets,\n Browsers,\n BrowserslistBrowserName,\n TargetsTuple,\n} from \"./types\";\n\nexport type { Target, Targets, InputTargets };\n\nexport { prettifyTargets } from \"./pretty\";\nexport { getInclusionReasons } from \"./debug\";\nexport { default as filterItems, isRequired } from \"./filter-items\";\nexport { unreleasedLabels } from \"./targets\";\nexport { TargetNames };\n\nconst ESM_SUPPORT = browserModulesData[\"es6.module\"];\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nfunction validateTargetNames(targets: Targets): TargetsTuple {\n const validTargets = Object.keys(TargetNames);\n for (const target of Object.keys(targets)) {\n if (!(target in TargetNames)) {\n throw new Error(\n v.formatMessage(`'${target}' is not a valid target\n- Did you mean '${findSuggestion(target, validTargets)}'?`),\n );\n }\n }\n\n return targets;\n}\n\nexport function isBrowsersQueryValid(browsers: unknown): boolean {\n return (\n typeof browsers === \"string\" ||\n (Array.isArray(browsers) && browsers.every(b => typeof b === \"string\"))\n );\n}\n\nfunction validateBrowsers(browsers: Browsers | undefined) {\n v.invariant(\n browsers === undefined || isBrowsersQueryValid(browsers),\n `'${String(browsers)}' is not a valid browserslist query`,\n );\n\n return browsers;\n}\n\nfunction getLowestVersions(browsers: Array): Targets {\n return browsers.reduce((all, browser) => {\n const [browserName, browserVersion] = browser.split(\" \") as [\n BrowserslistBrowserName,\n string,\n ];\n const target = browserNameMap[browserName];\n\n if (!target) {\n return all;\n }\n\n try {\n // Browser version can return as \"10.0-10.2\"\n const splitVersion = browserVersion.split(\"-\")[0].toLowerCase();\n const isSplitUnreleased = isUnreleasedVersion(splitVersion, target);\n\n if (!all[target]) {\n all[target] = isSplitUnreleased\n ? splitVersion\n : semverify(splitVersion);\n return all;\n }\n\n const version = all[target];\n const isUnreleased = isUnreleasedVersion(version, target);\n\n if (isUnreleased && isSplitUnreleased) {\n all[target] = getLowestUnreleased(version, splitVersion, target);\n } else if (isUnreleased) {\n all[target] = semverify(splitVersion);\n } else if (!isUnreleased && !isSplitUnreleased) {\n const parsedBrowserVersion = semverify(splitVersion);\n\n all[target] = semverMin(version, parsedBrowserVersion);\n }\n } catch (e) {}\n\n return all;\n }, {} as Record);\n}\n\nfunction outputDecimalWarning(\n decimalTargets: Array<{ target: string; value: number }>,\n) {\n if (!decimalTargets.length) {\n return;\n }\n\n console.warn(\"Warning, the following targets are using a decimal version:\\n\");\n decimalTargets.forEach(({ target, value }) =>\n console.warn(` ${target}: ${value}`),\n );\n console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`);\n}\n\nfunction semverifyTarget(target: Target, value: string) {\n try {\n return semverify(value);\n } catch (error) {\n throw new Error(\n v.formatMessage(\n `'${value}' is not a valid value for 'targets.${target}'.`,\n ),\n );\n }\n}\n\n// Parse `node: true` and `node: \"current\"` to version\nfunction nodeTargetParser(value: true | string) {\n const parsed =\n value === true || value === \"current\"\n ? process.versions.node\n : semverifyTarget(\"node\", value);\n return [\"node\", parsed] as const;\n}\n\nfunction defaultTargetParser(\n target: Exclude,\n value: string,\n): readonly [Exclude, string] {\n const version = isUnreleasedVersion(value, target)\n ? value.toLowerCase()\n : semverifyTarget(target, value);\n return [target, version] as const;\n}\n\nfunction generateTargets(inputTargets: InputTargets): Targets {\n const input = { ...inputTargets };\n delete input.esmodules;\n delete input.browsers;\n return input;\n}\n\nfunction resolveTargets(queries: Browsers, env?: string): Targets {\n const resolved = browserslist(queries, {\n mobileToDesktop: true,\n env,\n });\n return getLowestVersions(resolved);\n}\n\nconst targetsCache = new LruCache({ max: 64 });\n\nfunction resolveTargetsCached(queries: Browsers, env?: string): Targets {\n const cacheKey = typeof queries === \"string\" ? queries : queries.join() + env;\n let cached = targetsCache.get(cacheKey) as Targets | undefined;\n if (!cached) {\n cached = resolveTargets(queries, env);\n targetsCache.set(cacheKey, cached);\n }\n return { ...cached };\n}\n\ntype GetTargetsOption = {\n // This is not the path of the config file, but the path where start searching it from\n configPath?: string;\n // The path of the config file\n configFile?: string;\n // The env to pass to browserslist\n browserslistEnv?: string;\n // true to disable config loading\n ignoreBrowserslistConfig?: boolean;\n};\n\nexport default function getTargets(\n inputTargets: InputTargets = {},\n options: GetTargetsOption = {},\n): Targets {\n let { browsers, esmodules } = inputTargets;\n const { configPath = \".\" } = options;\n\n validateBrowsers(browsers);\n\n const input = generateTargets(inputTargets);\n let targets = validateTargetNames(input);\n\n const shouldParseBrowsers = !!browsers;\n const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;\n const shouldSearchForConfig =\n !options.ignoreBrowserslistConfig && !hasTargets;\n\n if (!browsers && shouldSearchForConfig) {\n browsers = browserslist.loadConfig({\n config: options.configFile,\n path: configPath,\n env: options.browserslistEnv,\n });\n if (browsers == null) {\n if (process.env.BABEL_8_BREAKING) {\n // In Babel 8, if no targets are passed, we use browserslist's defaults.\n browsers = [\"defaults\"];\n } else {\n // If no targets are passed, we need to overwrite browserslist's defaults\n // so that we enable all transforms (acting like the now deprecated\n // preset-latest).\n browsers = [];\n }\n }\n }\n\n // `esmodules` as a target indicates the specific set of browsers supporting ES Modules.\n // These values OVERRIDE the `browsers` field.\n if (esmodules && (esmodules !== \"intersect\" || !browsers?.length)) {\n browsers = Object.keys(ESM_SUPPORT)\n .map(\n (browser: keyof typeof ESM_SUPPORT) =>\n `${browser} >= ${ESM_SUPPORT[browser]}`,\n )\n .join(\", \");\n esmodules = false;\n }\n\n // If current value of `browsers` is undefined (`ignoreBrowserslistConfig` should be `false`)\n // or an empty array (without any user config, use default config),\n // we don't need to call `resolveTargets` to execute the related methods of `browserslist` library.\n if (browsers?.length) {\n const queryBrowsers = resolveTargetsCached(\n browsers,\n options.browserslistEnv,\n );\n\n if (esmodules === \"intersect\") {\n for (const browser of Object.keys(queryBrowsers) as Target[]) {\n const version = queryBrowsers[browser];\n const esmSupportVersion =\n // @ts-expect-error ie is not in ESM_SUPPORT\n ESM_SUPPORT[browser];\n\n if (esmSupportVersion) {\n queryBrowsers[browser] = getHighestUnreleased(\n version,\n semverify(esmSupportVersion),\n browser,\n );\n } else {\n delete queryBrowsers[browser];\n }\n }\n }\n\n targets = Object.assign(queryBrowsers, targets);\n }\n\n // Parse remaining targets\n const result: Targets = {};\n const decimalWarnings = [];\n for (const target of Object.keys(targets).sort() as Target[]) {\n const value = targets[target];\n\n // Warn when specifying minor/patch as a decimal\n if (typeof value === \"number\" && value % 1 !== 0) {\n decimalWarnings.push({ target, value });\n }\n\n const [parsedTarget, parsedValue] =\n target === \"node\"\n ? nodeTargetParser(value)\n : defaultTargetParser(target, value as string);\n\n if (parsedValue) {\n // Merge (lowest wins)\n result[parsedTarget] = parsedValue;\n }\n }\n\n outputDecimalWarning(decimalWarnings);\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,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AAC,EAAc;QAC5D,MAAMxD,OAAO,GAAGwD,aAAa,CAAClE,OAAO,CAAC;QACtC,MAAMmE,iBAAiB,GAErB9F,WAAW,CAAC2B,OAAO,CAAC;QAEtB,IAAImE,iBAAiB,EAAE;UACrBD,aAAa,CAAClE,OAAO,CAAC,GAAG,IAAAoE,2BAAoB,EAC3C1D,OAAO,EACP,IAAAD,gBAAS,EAAC0D,iBAAiB,CAAC,EAC5BnE,OACF,CAAC;QACH,CAAC,MAAM;UACL,OAAOkE,aAAa,CAAClE,OAAO,CAAC;QAC/B;MACF;IACF;IAEAtB,OAAO,GAAGE,MAAM,CAACsD,MAAM,CAACgC,aAAa,EAAExF,OAAO,CAAC;EACjD;EAGA,MAAM2F,MAAe,GAAG,CAAC,CAAC;EAC1B,MAAMC,eAAe,GAAG,EAAE;EAC1B,KAAK,MAAMvF,MAAM,IAAIH,MAAM,CAACC,IAAI,CAACH,OAAO,CAAC,CAAC6F,IAAI,CAAC,CAAC,EAAc;IAC5D,MAAMjD,KAAK,GAAG5C,OAAO,CAACK,MAAM,CAAC;IAG7B,IAAI,OAAOuC,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;MAChDgD,eAAe,CAACE,IAAI,CAAC;QAAEzF,MAAM;QAAEuC;MAAM,CAAC,CAAC;IACzC;IAEA,MAAM,CAACmD,YAAY,EAAEC,WAAW,CAAC,GAC/B3F,MAAM,KAAK,MAAM,GACb0C,gBAAgB,CAACH,KAAK,CAAC,GACvBQ,mBAAmB,CAAC/C,MAAM,EAAEuC,KAAe,CAAC;IAElD,IAAIoD,WAAW,EAAE;MAEfL,MAAM,CAACI,YAAY,CAAC,GAAGC,WAAW;IACpC;EACF;EAEA1D,oBAAoB,CAACsD,eAAe,CAAC;EAErC,OAAOD,MAAM;AACf"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/options.js b/node_modules/@babel/helper-compilation-targets/lib/options.js index fcabd960..0ec76e1e 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/options.js +++ b/node_modules/@babel/helper-compilation-targets/lib/options.js @@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.TargetNames = void 0; const TargetNames = { node: "node", + deno: "deno", chrome: "chrome", opera: "opera", edge: "edge", @@ -15,6 +16,9 @@ const TargetNames = { ios: "ios", android: "android", electron: "electron", - samsung: "samsung" + samsung: "samsung", + rhino: "rhino" }; -exports.TargetNames = TargetNames; \ No newline at end of file +exports.TargetNames = TargetNames; + +//# sourceMappingURL=options.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/options.js.map b/node_modules/@babel/helper-compilation-targets/lib/options.js.map new file mode 100644 index 00000000..9e3a3440 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/options.js.map @@ -0,0 +1 @@ +{"version":3,"names":["TargetNames","node","deno","chrome","opera","edge","firefox","safari","ie","ios","android","electron","samsung","rhino","exports"],"sources":["../src/options.ts"],"sourcesContent":["export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n};\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAG;EACzBC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,EAAE,EAAE,IAAI;EACRC,GAAG,EAAE,KAAK;EACVC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE;AACT,CAAC;AAACC,OAAA,CAAAd,WAAA,GAAAA,WAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/pretty.js b/node_modules/@babel/helper-compilation-targets/lib/pretty.js index d6ab79b2..73b002bf 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/pretty.js +++ b/node_modules/@babel/helper-compilation-targets/lib/pretty.js @@ -3,43 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.prettifyVersion = prettifyVersion; exports.prettifyTargets = prettifyTargets; - +exports.prettifyVersion = prettifyVersion; +var _semver = require("semver"); var _targets = require("./targets"); - -const semver = require("semver"); - function prettifyVersion(version) { if (typeof version !== "string") { return version; } - - const parts = [semver.major(version)]; - const minor = semver.minor(version); - const patch = semver.patch(version); - + const { + major, + minor, + patch + } = _semver.parse(version); + const parts = [major]; if (minor || patch) { parts.push(minor); } - if (patch) { parts.push(patch); } - return parts.join("."); } - function prettifyTargets(targets) { return Object.keys(targets).reduce((results, target) => { let value = targets[target]; const unreleasedLabel = _targets.unreleasedLabels[target]; - if (typeof value === "string" && unreleasedLabel !== value) { value = prettifyVersion(value); } - results[target] = value; return results; }, {}); -} \ No newline at end of file +} + +//# sourceMappingURL=pretty.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map b/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map new file mode 100644 index 00000000..4658d000 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_semver","require","_targets","prettifyVersion","version","major","minor","patch","semver","parse","parts","push","join","prettifyTargets","targets","Object","keys","reduce","results","target","value","unreleasedLabel","unreleasedLabels"],"sources":["../src/pretty.ts"],"sourcesContent":["import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets\";\nimport type { Targets, Target } from \"./types\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGO,SAASE,eAAeA,CAACC,OAAe,EAAE;EAC/C,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGC,OAAM,CAACC,KAAK,CAACL,OAAO,CAAC;EAErD,MAAMM,KAAK,GAAG,CAACL,KAAK,CAAC;EAErB,IAAIC,KAAK,IAAIC,KAAK,EAAE;IAClBG,KAAK,CAACC,IAAI,CAACL,KAAK,CAAC;EACnB;EAEA,IAAIC,KAAK,EAAE;IACTG,KAAK,CAACC,IAAI,CAACJ,KAAK,CAAC;EACnB;EAEA,OAAOG,KAAK,CAACE,IAAI,CAAC,GAAG,CAAC;AACxB;AAEO,SAASC,eAAeA,CAACC,OAAgB,EAAW;EACzD,OAAOC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAACC,OAAO,EAAEC,MAAc,KAAK;IAC9D,IAAIC,KAAK,GAAGN,OAAO,CAACK,MAAM,CAAC;IAE3B,MAAME,eAAe,GAEnBC,yBAAgB,CAACH,MAAM,CAAC;IAC1B,IAAI,OAAOC,KAAK,KAAK,QAAQ,IAAIC,eAAe,KAAKD,KAAK,EAAE;MAC1DA,KAAK,GAAGjB,eAAe,CAACiB,KAAK,CAAC;IAChC;IAEAF,OAAO,CAACC,MAAM,CAAC,GAAGC,KAAK;IACvB,OAAOF,OAAO;EAChB,CAAC,EAAE,CAAC,CAAY,CAAC;AACnB"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/targets.js b/node_modules/@babel/helper-compilation-targets/lib/targets.js index 9cd9e544..316e4cc1 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/targets.js +++ b/node_modules/@babel/helper-compilation-targets/lib/targets.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.browserNameMap = exports.unreleasedLabels = void 0; +exports.unreleasedLabels = exports.browserNameMap = void 0; const unreleasedLabels = { safari: "tp" }; @@ -19,9 +19,12 @@ const browserNameMap = { ie_mob: "ie", ios_saf: "ios", node: "node", + deno: "deno", op_mob: "opera", opera: "opera", safari: "safari", samsung: "samsung" }; -exports.browserNameMap = browserNameMap; \ No newline at end of file +exports.browserNameMap = browserNameMap; + +//# sourceMappingURL=targets.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/targets.js.map b/node_modules/@babel/helper-compilation-targets/lib/targets.js.map new file mode 100644 index 00000000..39929d17 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/targets.js.map @@ -0,0 +1 @@ +{"version":3,"names":["unreleasedLabels","safari","exports","browserNameMap","and_chr","and_ff","android","chrome","edge","firefox","ie","ie_mob","ios_saf","node","deno","op_mob","opera","samsung"],"sources":["../src/targets.ts"],"sourcesContent":["export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\nimport type { Target } from \"./types\";\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap: Record = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAG;EAC9BC,MAAM,EAAE;AACV,CAAU;AAACC,OAAA,CAAAF,gBAAA,GAAAA,gBAAA;AAKJ,MAAMG,cAAsC,GAAG;EACpDC,OAAO,EAAE,QAAQ;EACjBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,KAAK;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,OAAO;EACfC,KAAK,EAAE,OAAO;EACdf,MAAM,EAAE,QAAQ;EAChBgB,OAAO,EAAE;AACX,CAAU;AAACf,OAAA,CAAAC,cAAA,GAAAA,cAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-compilation-targets/lib/utils.js b/node_modules/@babel/helper-compilation-targets/lib/utils.js index 40a07a91..25cedecf 100644 --- a/node_modules/@babel/helper-compilation-targets/lib/utils.js +++ b/node_modules/@babel/helper-compilation-targets/lib/utils.js @@ -3,67 +3,56 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.semverMin = semverMin; -exports.semverify = semverify; -exports.isUnreleasedVersion = isUnreleasedVersion; -exports.getLowestUnreleased = getLowestUnreleased; exports.getHighestUnreleased = getHighestUnreleased; exports.getLowestImplementedVersion = getLowestImplementedVersion; - +exports.getLowestUnreleased = getLowestUnreleased; +exports.isUnreleasedVersion = isUnreleasedVersion; +exports.semverMin = semverMin; +exports.semverify = semverify; +var _semver = require("semver"); var _helperValidatorOption = require("@babel/helper-validator-option"); - var _targets = require("./targets"); - -const semver = require("semver"); - const versionRegExp = /^(\d+|\d+.\d+)$/; const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets"); - function semverMin(first, second) { - return first && semver.lt(first, second) ? first : second; + return first && _semver.lt(first, second) ? first : second; } - function semverify(version) { - if (typeof version === "string" && semver.valid(version)) { + if (typeof version === "string" && _semver.valid(version)) { return version; } - v.invariant(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), `'${version}' is not a valid version`); - const split = version.toString().split("."); - - while (split.length < 3) { - split.push("0"); + version = version.toString(); + let pos = 0; + let num = 0; + while ((pos = version.indexOf(".", pos + 1)) > 0) { + num++; } - - return split.join("."); + return version + ".0".repeat(2 - num); } - function isUnreleasedVersion(version, env) { const unreleasedLabel = _targets.unreleasedLabels[env]; return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase(); } - function getLowestUnreleased(a, b, env) { const unreleasedLabel = _targets.unreleasedLabels[env]; - const hasUnreleased = [a, b].some(item => item === unreleasedLabel); - - if (hasUnreleased) { - return a === hasUnreleased ? b : a || b; + if (a === unreleasedLabel) { + return b; + } + if (b === unreleasedLabel) { + return a; } - return semverMin(a, b); } - function getHighestUnreleased(a, b, env) { return getLowestUnreleased(a, b, env) === a ? b : a; } - function getLowestImplementedVersion(plugin, environment) { const result = plugin[environment]; - if (!result && environment === "android") { return plugin.chrome; } - return result; -} \ No newline at end of file +} + +//# sourceMappingURL=utils.js.map diff --git a/node_modules/@babel/helper-compilation-targets/lib/utils.js.map b/node_modules/@babel/helper-compilation-targets/lib/utils.js.map new file mode 100644 index 00000000..5e7d9cfe --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_semver","require","_helperValidatorOption","_targets","versionRegExp","v","OptionValidator","semverMin","first","second","semver","lt","semverify","version","valid","invariant","test","toString","pos","num","indexOf","repeat","isUnreleasedVersion","env","unreleasedLabel","unreleasedLabels","toLowerCase","getLowestUnreleased","a","b","getHighestUnreleased","getLowestImplementedVersion","plugin","environment","result","chrome"],"sources":["../src/utils.ts"],"sourcesContent":["import semver from \"semver\";\nimport { OptionValidator } from \"@babel/helper-validator-option\";\nimport { unreleasedLabels } from \"./targets\";\nimport type { Target, Targets } from \"./types\";\n\nconst versionRegExp = /^(\\d+|\\d+.\\d+)$/;\n\nconst v = new OptionValidator(PACKAGE_JSON.name);\n\nexport function semverMin(\n first: string | undefined | null,\n second: string,\n): string {\n return first && semver.lt(first, second) ? first : second;\n}\n\n// Convert version to a semver value.\n// 2.5 -> 2.5.0; 1 -> 1.0.0;\nexport function semverify(version: number | string): string {\n if (typeof version === \"string\" && semver.valid(version)) {\n return version;\n }\n\n v.invariant(\n typeof version === \"number\" ||\n (typeof version === \"string\" && versionRegExp.test(version)),\n `'${version}' is not a valid version`,\n );\n\n version = version.toString();\n\n let pos = 0;\n let num = 0;\n while ((pos = version.indexOf(\".\", pos + 1)) > 0) {\n num++;\n }\n return version + \".0\".repeat(2 - num);\n}\n\nexport function isUnreleasedVersion(\n version: string | number,\n env: Target,\n): boolean {\n const unreleasedLabel =\n // @ts-expect-error unreleasedLabel will be guarded later\n unreleasedLabels[env];\n return (\n !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase()\n );\n}\n\nexport function getLowestUnreleased(a: string, b: string, env: Target): string {\n const unreleasedLabel:\n | (typeof unreleasedLabels)[keyof typeof unreleasedLabels]\n | undefined =\n // @ts-expect-error unreleasedLabel is undefined when env is not safari\n unreleasedLabels[env];\n if (a === unreleasedLabel) {\n return b;\n }\n if (b === unreleasedLabel) {\n return a;\n }\n return semverMin(a, b);\n}\n\nexport function getHighestUnreleased(\n a: string,\n b: string,\n env: Target,\n): string {\n return getLowestUnreleased(a, b, env) === a ? b : a;\n}\n\nexport function getLowestImplementedVersion(\n plugin: Targets,\n environment: Target,\n): string {\n const result = plugin[environment];\n // When Android support data is absent, use Chrome data as fallback\n if (!result && environment === \"android\") {\n return plugin.chrome;\n }\n return result;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAGA,MAAMG,aAAa,GAAG,i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,eAAe,EAAE;IACzB,OAAOK,CAAC;EACV;EACA,IAAIA,CAAC,KAAKL,eAAe,EAAE;IACzB,OAAOI,CAAC;EACV;EACA,OAAOrB,SAAS,CAACqB,CAAC,EAAEC,CAAC,CAAC;AACxB;AAEO,SAASC,oBAAoBA,CAClCF,CAAS,EACTC,CAAS,EACTN,GAAW,EACH;EACR,OAAOI,mBAAmB,CAACC,CAAC,EAAEC,CAAC,EAAEN,GAAG,CAAC,KAAKK,CAAC,GAAGC,CAAC,GAAGD,CAAC;AACrD;AAEO,SAASG,2BAA2BA,CACzCC,MAAe,EACfC,WAAmB,EACX;EACR,MAAMC,MAAM,GAAGF,MAAM,CAACC,WAAW,CAAC;EAElC,IAAI,CAACC,MAAM,IAAID,WAAW,KAAK,SAAS,EAAE;IACxC,OAAOD,MAAM,CAACG,MAAM;EACtB;EACA,OAAOD,MAAM;AACf"} \ No newline at end of file diff --git a/node_modules/execa/node_modules/semver/LICENSE b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/LICENSE similarity index 100% rename from node_modules/execa/node_modules/semver/LICENSE rename to node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/LICENSE diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/README.md b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/README.md new file mode 100644 index 00000000..435dfebb --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/README.md @@ -0,0 +1,166 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = new LRU(options) + , otherCache = new LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +// but note that it must be THE SAME object, not +// just a JSON-equivalent object. +var someObject = { a: 1 } +cache.set(someObject, 'a value') +// Object keys are not toString()-ed +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') +// A similar object with same keys/values won't work, +// because it's a different object identity +assert.equal(cache.get({ a: 1 }), undefined) + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. Setting it to a non-number or negative number will + throw a `TypeError`. Setting it to 0 makes it be `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. + Setting this to a negative value will make everything seem old! + Setting it to a non-number will throw a `TypeError`. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. +* `updateAgeOnGet` When using time-expiring entries with `maxAge`, + setting this to `true` will make each item's effective time update + to the current time whenever it is retrieved from cache, causing it + to not expire. (It can still fall out of cache based on recency of + use, of course.) + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js new file mode 100644 index 00000000..573b6b85 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/index.js @@ -0,0 +1,334 @@ +'use strict' + +// A linked list to keep track of recently-used-ness +const Yallist = require('yallist') + +const MAX = Symbol('max') +const LENGTH = Symbol('length') +const LENGTH_CALCULATOR = Symbol('lengthCalculator') +const ALLOW_STALE = Symbol('allowStale') +const MAX_AGE = Symbol('maxAge') +const DISPOSE = Symbol('dispose') +const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') +const LRU_LIST = Symbol('lruList') +const CACHE = Symbol('cache') +const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + +const naiveLength = () => 1 + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +class LRUCache { + constructor (options) { + if (typeof options === 'number') + options = { max: options } + + if (!options) + options = {} + + if (options.max && (typeof options.max !== 'number' || options.max < 0)) + throw new TypeError('max must be a non-negative number') + // Kind of weird to have a default max of Infinity, but oh well. + const max = this[MAX] = options.max || Infinity + + const lc = options.length || naiveLength + this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc + this[ALLOW_STALE] = options.stale || false + if (options.maxAge && typeof options.maxAge !== 'number') + throw new TypeError('maxAge must be a number') + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false + this.reset() + } + + // resize the cache when the max changes. + set max (mL) { + if (typeof mL !== 'number' || mL < 0) + throw new TypeError('max must be a non-negative number') + + this[MAX] = mL || Infinity + trim(this) + } + get max () { + return this[MAX] + } + + set allowStale (allowStale) { + this[ALLOW_STALE] = !!allowStale + } + get allowStale () { + return this[ALLOW_STALE] + } + + set maxAge (mA) { + if (typeof mA !== 'number') + throw new TypeError('maxAge must be a non-negative number') + + this[MAX_AGE] = mA + trim(this) + } + get maxAge () { + return this[MAX_AGE] + } + + // resize the cache when the lengthCalculator changes. + set lengthCalculator (lC) { + if (typeof lC !== 'function') + lC = naiveLength + + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(hit => { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }) + } + trim(this) + } + get lengthCalculator () { return this[LENGTH_CALCULATOR] } + + get length () { return this[LENGTH] } + get itemCount () { return this[LRU_LIST].length } + + rforEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].tail; walker !== null;) { + const prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } + } + + forEach (fn, thisp) { + thisp = thisp || this + for (let walker = this[LRU_LIST].head; walker !== null;) { + const next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } + } + + keys () { + return this[LRU_LIST].toArray().map(k => k.key) + } + + values () { + return this[LRU_LIST].toArray().map(k => k.value) + } + + reset () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list + } + + dump () { + return this[LRU_LIST].map(hit => + isStale(this, hit) ? false : { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }).toArray().filter(h => h) + } + + dumpLru () { + return this[LRU_LIST] + } + + set (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + if (maxAge && typeof maxAge !== 'number') + throw new TypeError('maxAge must be a number') + + const now = maxAge ? Date.now() : 0 + const len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + const node = this[CACHE].get(key) + const item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) + this[DISPOSE](key, item.value) + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + const hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) + this[DISPOSE](key, value) + + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true + } + + has (key) { + if (!this[CACHE].has(key)) return false + const hit = this[CACHE].get(key).value + return !isStale(this, hit) + } + + get (key) { + return get(this, key, true) + } + + peek (key) { + return get(this, key, false) + } + + pop () { + const node = this[LRU_LIST].tail + if (!node) + return null + + del(this, node) + return node.value + } + + del (key) { + del(this, this[CACHE].get(key)) + } + + load (arr) { + // reset the cache + this.reset() + + const now = Date.now() + // A previous serialized cache has the most recent items first + for (let l = arr.length - 1; l >= 0; l--) { + const hit = arr[l] + const expiresAt = hit.e || 0 + if (expiresAt === 0) + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + else { + const maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } + } + + prune () { + this[CACHE].forEach((value, key) => get(this, key, false)) + } +} + +const get = (self, key, doUse) => { + const node = self[CACHE].get(key) + if (node) { + const hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + return undefined + } else { + if (doUse) { + if (self[UPDATE_AGE_ON_GET]) + node.value.now = Date.now() + self[LRU_LIST].unshiftNode(node) + } + } + return hit.value + } +} + +const isStale = (self, hit) => { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) + return false + + const diff = Date.now() - hit.now + return hit.maxAge ? diff > hit.maxAge + : self[MAX_AGE] && (diff > self[MAX_AGE]) +} + +const trim = self => { + if (self[LENGTH] > self[MAX]) { + for (let walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + const prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +const del = (self, node) => { + if (node) { + const hit = node.value + if (self[DISPOSE]) + self[DISPOSE](hit.key, hit.value) + + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +class Entry { + constructor (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 + } +} + +const forEachStep = (self, fn, node, thisp) => { + let hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) + hit = undefined + } + if (hit) + fn.call(thisp, hit.value, hit.key, self) +} + +module.exports = LRUCache diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/package.json b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/package.json new file mode 100644 index 00000000..d4611f8c --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/lru-cache/package.json @@ -0,0 +1,32 @@ +{ + "name": "lru-cache", + "description": "A cache object that deletes the least-recently-used items.", + "version": "5.1.1", + "author": "Isaac Z. Schlueter ", + "keywords": [ + "mru", + "lru", + "cache" + ], + "scripts": { + "test": "tap test/*.js --100 -J", + "snap": "TAP_SNAPSHOT=1 tap test/*.js -J", + "coveragerport": "tap --coverage-report=html", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "main": "index.js", + "repository": "git://github.com/isaacs/node-lru-cache.git", + "devDependencies": { + "benchmark": "^2.1.4", + "tap": "^12.1.0" + }, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + }, + "files": [ + "index.js" + ] +} diff --git a/node_modules/execa/node_modules/which/LICENSE b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/LICENSE similarity index 100% rename from node_modules/execa/node_modules/which/LICENSE rename to node_modules/@babel/helper-compilation-targets/node_modules/yallist/LICENSE diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/yallist/README.md b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/README.md new file mode 100644 index 00000000..f5861018 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js new file mode 100644 index 00000000..d41c97a1 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/iterator.js @@ -0,0 +1,8 @@ +'use strict' +module.exports = function (Yallist) { + Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } + } +} diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/yallist/package.json b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/package.json new file mode 100644 index 00000000..27128099 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/package.json @@ -0,0 +1,29 @@ +{ + "name": "yallist", + "version": "3.1.1", + "description": "Yet Another Linked List", + "main": "yallist.js", + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "dependencies": {}, + "devDependencies": { + "tap": "^12.1.0" + }, + "scripts": { + "test": "tap test/*.js --100", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js new file mode 100644 index 00000000..ed4e7303 --- /dev/null +++ b/node_modules/@babel/helper-compilation-targets/node_modules/yallist/yallist.js @@ -0,0 +1,426 @@ +'use strict' +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null + + return next +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) { + if (start > this.length) { + start = this.length - 1 + } + if (start < 0) { + start = this.length + start; + } + + for (var i = 0, walker = this.head; walker !== null && i < start; i++) { + walker = walker.next + } + + var ret = [] + for (var i = 0; walker && i < deleteCount; i++) { + ret.push(walker.value) + walker = this.removeNode(walker) + } + if (walker === null) { + walker = this.tail + } + + if (walker !== this.head && walker !== this.tail) { + walker = walker.prev + } + + for (var i = 2; i < arguments.length; i++) { + walker = insert(this, walker, arguments[i]) + } + return ret; +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function insert (self, node, value) { + var inserted = node === self.head ? + new Node(value, null, node, self) : + new Node(value, node, node.next, self) + + if (inserted.next === null) { + self.tail = inserted + } + if (inserted.prev === null) { + self.head = inserted + } + + self.length++ + + return inserted +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} + +try { + // add if support for Symbol.iterator is present + require('./iterator.js')(Yallist) +} catch (er) {} diff --git a/node_modules/@babel/helper-compilation-targets/package.json b/node_modules/@babel/helper-compilation-targets/package.json index 2bf1408c..2c1bdbdf 100644 --- a/node_modules/@babel/helper-compilation-targets/package.json +++ b/node_modules/@babel/helper-compilation-targets/package.json @@ -1,68 +1,44 @@ { - "_from": "@babel/helper-compilation-targets@^7.13.13", - "_id": "@babel/helper-compilation-targets@7.13.13", - "_inBundle": false, - "_integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", - "_location": "/@babel/helper-compilation-targets", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-compilation-targets@^7.13.13", - "name": "@babel/helper-compilation-targets", - "escapedName": "@babel%2fhelper-compilation-targets", - "scope": "@babel", - "rawSpec": "^7.13.13", - "saveSpec": null, - "fetchSpec": "^7.13.13" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "_shasum": "2b2972a0926474853f41e4adbc69338f520600e5", - "_spec": "@babel/helper-compilation-targets@^7.13.13", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/core", - "author": { - "name": "The Babel Team", - "url": "https://babel.dev/team" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" - }, - "deprecated": false, - "description": "Engine compat data used in @babel/preset-env", - "devDependencies": { - "@babel/core": "7.13.13" + "name": "@babel/helper-compilation-targets", + "version": "7.22.1", + "author": "The Babel Team (https://babel.dev/team)", + "license": "MIT", + "description": "Helper functions on Babel compilation targets", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-compilation-targets" }, + "main": "./lib/index.js", "exports": { - ".": "./lib/index.js" + ".": "./lib/index.js", + "./package.json": "./package.json" + }, + "publishConfig": { + "access": "public" }, - "homepage": "https://github.com/babel/babel#readme", "keywords": [ "babel", "babel-plugin" ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-compilation-targets", + "dependencies": { + "@babel/compat-data": "^7.22.0", + "@babel/helper-validator-option": "^7.21.0", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", + "semver": "^6.3.0" + }, "peerDependencies": { "@babel/core": "^7.0.0" }, - "publishConfig": { - "access": "public" + "devDependencies": { + "@babel/core": "^7.22.1", + "@babel/helper-plugin-test-runner": "^7.18.6", + "@types/lru-cache": "^5.1.1", + "@types/semver": "^5.5.0" }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-compilation-targets" + "engines": { + "node": ">=6.9.0" }, - "version": "7.13.13" -} + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-get-function-arity/LICENSE b/node_modules/@babel/helper-environment-visitor/LICENSE similarity index 100% rename from node_modules/@babel/helper-get-function-arity/LICENSE rename to node_modules/@babel/helper-environment-visitor/LICENSE diff --git a/node_modules/@babel/helper-environment-visitor/README.md b/node_modules/@babel/helper-environment-visitor/README.md new file mode 100644 index 00000000..ec74ac36 --- /dev/null +++ b/node_modules/@babel/helper-environment-visitor/README.md @@ -0,0 +1,19 @@ +# @babel/helper-environment-visitor + +> Helper visitor to only visit nodes in the current 'this' context + +See our website [@babel/helper-environment-visitor](https://babeljs.io/docs/en/babel-helper-environment-visitor) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/helper-environment-visitor +``` + +or using yarn: + +```sh +yarn add @babel/helper-environment-visitor --dev +``` diff --git a/node_modules/@babel/helper-environment-visitor/lib/index.js b/node_modules/@babel/helper-environment-visitor/lib/index.js new file mode 100644 index 00000000..6bc279a3 --- /dev/null +++ b/node_modules/@babel/helper-environment-visitor/lib/index.js @@ -0,0 +1,56 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +exports.requeueComputedKeyAndDecorators = requeueComputedKeyAndDecorators; +{ + { + { + exports.skipAllButComputedKey = function skipAllButComputedKey(path) { + path.skip(); + if (path.node.computed) { + path.context.maybeQueue(path.get("key")); + } + }; + } + } +} +function requeueComputedKeyAndDecorators(path) { + const { + context, + node + } = path; + if (node.computed) { + context.maybeQueue(path.get("key")); + } + if (node.decorators) { + for (const decorator of path.get("decorators")) { + context.maybeQueue(decorator); + } + } +} +const visitor = { + FunctionParent(path) { + if (path.isArrowFunctionExpression()) { + return; + } else { + path.skip(); + if (path.isMethod()) { + requeueComputedKeyAndDecorators(path); + } + } + }, + Property(path) { + if (path.isObjectProperty()) { + return; + } + path.skip(); + requeueComputedKeyAndDecorators(path); + } +}; +var _default = visitor; +exports.default = _default; + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-environment-visitor/lib/index.js.map b/node_modules/@babel/helper-environment-visitor/lib/index.js.map new file mode 100644 index 00000000..241c3ad5 --- /dev/null +++ b/node_modules/@babel/helper-environment-visitor/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["exports","skipAllButComputedKey","path","skip","node","computed","context","maybeQueue","get","requeueComputedKeyAndDecorators","decorators","decorator","visitor","FunctionParent","isArrowFunctionExpression","isMethod","Property","isObjectProperty","_default","default"],"sources":["../src/index.ts"],"sourcesContent":["import type { NodePath, Visitor } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nif (!process.env.BABEL_8_BREAKING) {\n if (!USE_ESM) {\n if (!IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.skipAllButComputedKey = function skipAllButComputedKey(\n path: NodePath,\n ) {\n path.skip();\n if (path.node.computed) {\n // requeue the computed key\n path.context.maybeQueue(path.get(\"key\"));\n }\n };\n }\n }\n}\n\nexport function requeueComputedKeyAndDecorators(\n path: NodePath,\n) {\n const { context, node } = path;\n // @ts-expect-error ClassPrivateProperty does not have computed\n if (node.computed) {\n // requeue the computed key\n context.maybeQueue(path.get(\"key\"));\n }\n if (node.decorators) {\n for (const decorator of path.get(\"decorators\")) {\n // requeue the decorators\n context.maybeQueue(decorator);\n }\n }\n}\n\n// environmentVisitor should be used when traversing the whole class and not for specific class elements/methods.\n// For perf reasons, the environmentVisitor might be traversed with `{ noScope: true }`, which means `path.scope` is undefined.\n// Avoid using `path.scope` here\nconst visitor: Visitor = {\n FunctionParent(path) {\n if (path.isArrowFunctionExpression()) {\n // arrows are not skipped because they inherit the context.\n return;\n } else {\n path.skip();\n if (path.isMethod()) {\n requeueComputedKeyAndDecorators(path);\n }\n }\n },\n Property(path) {\n if (path.isObjectProperty()) {\n return;\n }\n path.skip();\n requeueComputedKeyAndDecorators(path);\n },\n};\n\nexport default visitor;\n"],"mappings":";;;;;;;AAGmC;EACnB;IACQ;MAElBA,OAAO,CAACC,qBAAqB,GAAG,SAASA,qBAAqBA,CAC5DC,IAA0C,EAC1C;QACAA,IAAI,CAACC,IAAI,CAAC,CAAC;QACX,IAAID,IAAI,CAACE,IAAI,CAACC,QAAQ,EAAE;UAEtBH,IAAI,CAACI,OAAO,CAACC,UAAU,CAACL,IAAI,CAACM,GAAG,CAAC,KAAK,CAAC,CAAC;QAC1C;MACF,CAAC;IACH;EACF;AACF;AAEO,SAASC,+BAA+BA,CAC7CP,IAAqC,EACrC;EACA,MAAM;IAAEI,OAAO;IAAEF;EAAK,CAAC,GAAGF,IAAI;EAE9B,IAAIE,IAAI,CAACC,QAAQ,EAAE;IAEjBC,OAAO,CAACC,UAAU,CAACL,IAAI,CAACM,GAAG,CAAC,KAAK,CAAC,CAAC;EACrC;EACA,IAAIJ,IAAI,CAACM,UAAU,EAAE;IACnB,KAAK,MAAMC,SAAS,IAAIT,IAAI,CAACM,GAAG,CAAC,YAAY,CAAC,EAAE;MAE9CF,OAAO,CAACC,UAAU,CAACI,SAAS,CAAC;IAC/B;EACF;AACF;AAKA,MAAMC,OAAgB,GAAG;EACvBC,cAAcA,CAACX,IAAI,EAAE;IACnB,IAAIA,IAAI,CAACY,yBAAyB,CAAC,CAAC,EAAE;MAEpC;IACF,CAAC,MAAM;MACLZ,IAAI,CAACC,IAAI,CAAC,CAAC;MACX,IAAID,IAAI,CAACa,QAAQ,CAAC,CAAC,EAAE;QACnBN,+BAA+B,CAACP,IAAI,CAAC;MACvC;IACF;EACF,CAAC;EACDc,QAAQA,CAACd,IAAI,EAAE;IACb,IAAIA,IAAI,CAACe,gBAAgB,CAAC,CAAC,EAAE;MAC3B;IACF;IACAf,IAAI,CAACC,IAAI,CAAC,CAAC;IACXM,+BAA+B,CAACP,IAAI,CAAC;EACvC;AACF,CAAC;AAAC,IAAAgB,QAAA,GAEaN,OAAO;AAAAZ,OAAA,CAAAmB,OAAA,GAAAD,QAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-environment-visitor/package.json b/node_modules/@babel/helper-environment-visitor/package.json new file mode 100644 index 00000000..ff56e85a --- /dev/null +++ b/node_modules/@babel/helper-environment-visitor/package.json @@ -0,0 +1,29 @@ +{ + "name": "@babel/helper-environment-visitor", + "version": "7.22.1", + "description": "Helper visitor to only visit nodes in the current 'this' context", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-environment-visitor" + }, + "homepage": "https://babel.dev/docs/en/next/babel-helper-environment-visitor", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, + "devDependencies": { + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-function-name/README.md b/node_modules/@babel/helper-function-name/README.md index 36a65931..1e490aea 100644 --- a/node_modules/@babel/helper-function-name/README.md +++ b/node_modules/@babel/helper-function-name/README.md @@ -9,11 +9,11 @@ See our website [@babel/helper-function-name](https://babeljs.io/docs/en/babel-h Using npm: ```sh -npm install --save-dev @babel/helper-function-name +npm install --save @babel/helper-function-name ``` or using yarn: ```sh -yarn add @babel/helper-function-name --dev +yarn add @babel/helper-function-name ``` diff --git a/node_modules/@babel/helper-function-name/lib/index.js b/node_modules/@babel/helper-function-name/lib/index.js index 00e1b557..2f0ead7f 100644 --- a/node_modules/@babel/helper-function-name/lib/index.js +++ b/node_modules/@babel/helper-function-name/lib/index.js @@ -4,20 +4,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; - -var _helperGetFunctionArity = _interopRequireDefault(require("@babel/helper-get-function-arity")); - -var _template = _interopRequireDefault(require("@babel/template")); - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const buildPropertyMethodAssignmentWrapper = (0, _template.default)(` +var _template = require("@babel/template"); +var _t = require("@babel/types"); +const { + NOT_LOCAL_BINDING, + cloneNode, + identifier, + isAssignmentExpression, + isAssignmentPattern, + isFunction, + isIdentifier, + isLiteral, + isNullLiteral, + isObjectMethod, + isObjectProperty, + isRegExpLiteral, + isRestElement, + isTemplateLiteral, + isVariableDeclarator, + toBindingIdentifierName +} = _t; +function getFunctionArity(node) { + const count = node.params.findIndex(param => isAssignmentPattern(param) || isRestElement(param)); + return count === -1 ? node.params.length : count; +} +const buildPropertyMethodAssignmentWrapper = _template.default.statement(` (function (FUNCTION_KEY) { function FUNCTION_ID() { return FUNCTION_KEY.apply(this, arguments); @@ -30,7 +41,7 @@ const buildPropertyMethodAssignmentWrapper = (0, _template.default)(` return FUNCTION_ID; })(FUNCTION) `); -const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(` +const buildGeneratorPropertyMethodAssignmentWrapper = _template.default.statement(` (function (FUNCTION_KEY) { function* FUNCTION_ID() { return yield* FUNCTION_KEY.apply(this, arguments); @@ -51,70 +62,55 @@ const visitor = { state.selfReference = true; path.stop(); } - }; - function getNameFromLiteralId(id) { - if (t.isNullLiteral(id)) { + if (isNullLiteral(id)) { return "null"; } - - if (t.isRegExpLiteral(id)) { + if (isRegExpLiteral(id)) { return `_${id.pattern}_${id.flags}`; } - - if (t.isTemplateLiteral(id)) { + if (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; + if (!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++) { + for (let i = 0, len = getFunctionArity(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; @@ -122,57 +118,53 @@ function visit(node, name, scope) { } else if (state.outerDeclar || scope.hasGlobal(name)) { scope.traverse(node, visitor, state); } - return state; } - function _default({ node, parent, scope, id -}, localBinding = false) { +}, localBinding = false, supportUnicodeId = false) { if (node.id) return; - - if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, { + if ((isObjectProperty(parent) || isObjectMethod(parent, { kind: "method" - })) && (!parent.computed || t.isLiteral(parent.key))) { + })) && (!parent.computed || isLiteral(parent.key))) { id = parent.key; - } else if (t.isVariableDeclarator(parent)) { + } else if (isVariableDeclarator(parent)) { id = parent.id; - - if (t.isIdentifier(id) && !localBinding) { + if (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; + node.id = cloneNode(id); + node.id[NOT_LOCAL_BINDING] = true; return; } } - } else if (t.isAssignmentExpression(parent, { + } else if (isAssignmentExpression(parent, { operator: "=" })) { id = parent.left; } else if (!id) { return; } - let name; - - if (id && t.isLiteral(id)) { + if (id && isLiteral(id)) { name = getNameFromLiteralId(id); - } else if (id && t.isIdentifier(id)) { + } else if (id && isIdentifier(id)) { name = id.name; } - if (name === undefined) { return; } - - name = t.toBindingIdentifierName(name); - id = t.identifier(name); - id[t.NOT_LOCAL_BINDING] = true; + if (!supportUnicodeId && isFunction(node) && /[\uD800-\uDFFF]/.test(name)) { + return; + } + name = toBindingIdentifierName(name); + const newId = identifier(name); + newId[NOT_LOCAL_BINDING] = true; const state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; -} \ No newline at end of file + return wrap(state, node, newId, scope) || node; +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-function-name/lib/index.js.map b/node_modules/@babel/helper-function-name/lib/index.js.map new file mode 100644 index 00000000..4043586b --- /dev/null +++ b/node_modules/@babel/helper-function-name/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NOT_LOCAL_BINDING","cloneNode","identifier","isAssignmentExpression","isAssignmentPattern","isFunction","isIdentifier","isLiteral","isNullLiteral","isObjectMethod","isObjectProperty","isRegExpLiteral","isRestElement","isTemplateLiteral","isVariableDeclarator","toBindingIdentifierName","getFunctionArity","node","count","params","findIndex","param","length","buildPropertyMethodAssignmentWrapper","template","statement","buildGeneratorPropertyMethodAssignmentWrapper","visitor","path","state","name","localDeclar","scope","getBindingIdentifier","outerDeclar","selfReference","stop","getNameFromLiteralId","id","pattern","flags","quasis","map","quasi","value","raw","join","undefined","wrap","method","hasBinding","hasGlobal","rename","build","generator","FUNCTION","FUNCTION_ID","FUNCTION_KEY","generateUidIdentifier","expression","callee","body","i","len","push","getProgramParent","references","visit","selfAssignment","binding","getOwnBinding","kind","traverse","parent","localBinding","supportUnicodeId","computed","key","getBinding","constant","operator","left","test","newId"],"sources":["../src/index.ts"],"sourcesContent":["import template from \"@babel/template\";\nimport {\n NOT_LOCAL_BINDING,\n cloneNode,\n identifier,\n isAssignmentExpression,\n isAssignmentPattern,\n isFunction,\n isIdentifier,\n isLiteral,\n isNullLiteral,\n isObjectMethod,\n isObjectProperty,\n isRegExpLiteral,\n isRestElement,\n isTemplateLiteral,\n isVariableDeclarator,\n toBindingIdentifierName,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, Visitor } from \"@babel/traverse\";\n\nfunction getFunctionArity(node: t.Function): number {\n const count = node.params.findIndex(\n param => isAssignmentPattern(param) || isRestElement(param),\n );\n return count === -1 ? node.params.length : count;\n}\n\nconst buildPropertyMethodAssignmentWrapper = template.statement(`\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`);\n\nconst buildGeneratorPropertyMethodAssignmentWrapper = template.statement(`\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`);\n\ntype State = {\n name: string;\n outerDeclar: t.Identifier;\n selfAssignment: boolean;\n selfReference: boolean;\n};\n\nconst visitor: Visitor = {\n \"ReferencedIdentifier|BindingIdentifier\"(\n path: NodePath,\n state,\n ) {\n // check if this node matches our function id\n if (path.node.name !== state.name) return;\n\n // check that we don't have a local variable declared as that removes the need\n // for the wrapper\n const localDeclar = path.scope.getBindingIdentifier(state.name);\n if (localDeclar !== state.outerDeclar) return;\n\n state.selfReference = true;\n path.stop();\n },\n};\n\nfunction getNameFromLiteralId(id: t.Literal) {\n if (isNullLiteral(id)) {\n return \"null\";\n }\n\n if (isRegExpLiteral(id)) {\n return `_${id.pattern}_${id.flags}`;\n }\n\n if (isTemplateLiteral(id)) {\n return id.quasis.map(quasi => quasi.value.raw).join(\"\");\n }\n\n if (id.value !== undefined) {\n return id.value + \"\";\n }\n\n return \"\";\n}\n\nfunction wrap(\n state: State,\n method: t.FunctionExpression | t.Class,\n id: t.Identifier,\n scope: Scope,\n) {\n if (state.selfReference) {\n if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {\n // we can just munge the local binding\n scope.rename(id.name);\n } else {\n // we don't currently support wrapping class expressions\n if (!isFunction(method)) return;\n\n // need to add a wrapper since we can't change the references\n let build = buildPropertyMethodAssignmentWrapper;\n if (method.generator) {\n build = buildGeneratorPropertyMethodAssignmentWrapper;\n }\n\n const template = (\n build({\n FUNCTION: method,\n FUNCTION_ID: id,\n FUNCTION_KEY: scope.generateUidIdentifier(id.name),\n }) as t.ExpressionStatement\n ).expression as t.CallExpression;\n\n // shim in dummy params to retain function arity, if you try to read the\n // source then you'll get the original since it's proxied so it's all good\n const params = (\n (template.callee as t.FunctionExpression).body\n .body[0] as any as t.FunctionExpression\n ).params;\n\n for (let i = 0, len = getFunctionArity(method); i < len; i++) {\n params.push(scope.generateUidIdentifier(\"x\"));\n }\n\n return template;\n }\n }\n\n method.id = id;\n scope.getProgramParent().references[id.name] = true;\n}\n\nfunction visit(\n node: t.FunctionExpression | t.Class,\n name: string,\n scope: Scope,\n) {\n const state: State = {\n selfAssignment: false,\n selfReference: false,\n outerDeclar: scope.getBindingIdentifier(name),\n name: name,\n };\n\n // check to see if we have a local binding of the id we're setting inside of\n // the function, this is important as there are caveats associated\n\n const binding = scope.getOwnBinding(name);\n\n if (binding) {\n if (binding.kind === \"param\") {\n // safari will blow up in strict mode with code like:\n //\n // let t = function t(t) {};\n //\n // with the error:\n //\n // Cannot declare a parameter named 't' as it shadows the name of a\n // strict mode function.\n //\n // this isn't to the spec and they've invented this behaviour which is\n // **extremely** annoying so we avoid setting the name if it has a param\n // with the same id\n state.selfReference = true;\n } else {\n // otherwise it's defined somewhere in scope like:\n //\n // let t = function () {\n // let t = 2;\n // };\n //\n // so we can safely just set the id and move along as it shadows the\n // bound function id\n }\n } else if (state.outerDeclar || scope.hasGlobal(name)) {\n scope.traverse(node, visitor, state);\n }\n\n return state;\n}\n\n/**\n * Add id to function/class expression inferred from the AST\n *\n * @export\n * @template N The unnamed expression type\n * @param {Object} nodePathLike The NodePath-like input\n * @param {N} nodePathLike.node an AST node\n * @param {NodePath[\"parent\"]} [nodePathLike.parent] The parent of the AST node\n * @param {Scope} nodePathLike.scope The scope associated to the AST node\n * @param {t.LVal | t.StringLiteral | t.NumericLiteral | t.BigIntLiteral} [nodePathLike.id] the fallback naming source when the helper\n * can not infer the function name from the AST\n * @param {boolean} [localBinding=false] whether a name could shadow a self-reference (e.g. converting arrow function)\n * @param {boolean} [supportUnicodeId=false] whether the compilation target supports unicodeId (non-BMP characters) or not\n * @returns {(N | t.CallExpression | void)}\n * - modified node when name can be inferred,\n * - an IIFE when `node` contains a binding shadowing the inferred function name (e.g. `let f = function (f) {}`),\n * - `void` when `node` has `id` property or the helper can not inferred the name or the inferred name contains non-BMP characters that is not supported by current target\n */\nexport default function (\n {\n node,\n parent,\n scope,\n id,\n }: {\n node: N;\n parent?: NodePath[\"parent\"];\n scope: Scope;\n id?: t.LVal | t.StringLiteral | t.NumericLiteral | t.BigIntLiteral;\n },\n localBinding = false,\n supportUnicodeId = false,\n): N | t.CallExpression | void {\n // has an `id` so we don't need to infer one\n if (node.id) return;\n\n if (\n (isObjectProperty(parent) || isObjectMethod(parent, { kind: \"method\" })) &&\n (!parent.computed || isLiteral(parent.key))\n ) {\n // { foo() {} };\n id = parent.key as\n | t.Identifier\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral;\n } else if (isVariableDeclarator(parent)) {\n // let foo = function () {};\n id = parent.id;\n\n // but not \"let foo = () => {};\" being converted to function expression\n if (isIdentifier(id) && !localBinding) {\n const binding = scope.parent.getBinding(id.name);\n if (\n binding &&\n binding.constant &&\n scope.getBinding(id.name) === binding\n ) {\n // always going to reference this method\n node.id = cloneNode(id);\n // @ts-expect-error Fixme: avoid mutating AST nodes\n node.id[NOT_LOCAL_BINDING] = true;\n return;\n }\n }\n } else if (isAssignmentExpression(parent, { operator: \"=\" })) {\n // foo = function () {};\n id = parent.left;\n } else if (!id) {\n return;\n }\n\n let name;\n if (id && isLiteral(id)) {\n name = getNameFromLiteralId(id);\n } else if (id && isIdentifier(id)) {\n name = id.name;\n }\n\n if (name === undefined) {\n return;\n }\n\n if (!supportUnicodeId && isFunction(node) && /[\\uD800-\\uDFFF]/.test(name)) {\n return;\n }\n\n name = toBindingIdentifierName(name);\n const newId = identifier(name);\n\n // The id shouldn't be considered a local binding to the function because\n // we are simply trying to set the function name and not actually create\n // a local binding.\n // @ts-expect-error Fixme: avoid mutating AST nodes\n newId[NOT_LOCAL_BINDING] = true;\n\n const state = visit(node, name, scope);\n return wrap(state, node, newId, scope) || node;\n}\n"],"mappings":";;;;;;AAAA;AACA;AAiBsB;EAhBpBA,iBAAiB;EACjBC,SAAS;EACTC,UAAU;EACVC,sBAAsB;EACtBC,mBAAmB;EACnBC,UAAU;EACVC,YAAY;EACZC,SAAS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E;EACF;EAEAA,IAAI,GAAGf,uBAAuB,CAACe,IAAI,CAAC;EACpC,MAAMqD,KAAK,GAAGjF,UAAU,CAAC4B,IAAI,CAAC;EAM9BqD,KAAK,CAACnF,iBAAiB,CAAC,GAAG,IAAI;EAE/B,MAAM6B,KAAK,GAAGsC,KAAK,CAAClD,IAAI,EAAEa,IAAI,EAAEE,KAAK,CAAC;EACtC,OAAOgB,IAAI,CAACnB,KAAK,EAAEZ,IAAI,EAAEkE,KAAK,EAAEnD,KAAK,CAAC,IAAIf,IAAI;AAChD"} \ 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 index 26e1c610..ce65d6bc 100644 --- a/node_modules/@babel/helper-function-name/package.json +++ b/node_modules/@babel/helper-function-name/package.json @@ -1,50 +1,25 @@ { - "_from": "@babel/helper-function-name@^7.12.13", - "_id": "@babel/helper-function-name@7.12.13", - "_inBundle": false, - "_integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "_location": "/@babel/helper-function-name", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-function-name@^7.12.13", - "name": "@babel/helper-function-name", - "escapedName": "@babel%2fhelper-function-name", - "scope": "@babel", - "rawSpec": "^7.12.13", - "saveSpec": null, - "fetchSpec": "^7.12.13" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "_shasum": "93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a", - "_spec": "@babel/helper-function-name@^7.12.13", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/traverse", - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - }, - "deprecated": false, + "name": "@babel/helper-function-name", + "version": "7.21.0", "description": "Helper function to change the property 'name' of every function", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-function-name" + }, "homepage": "https://babel.dev/docs/en/next/babel-helper-function-name", "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-function-name", "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-function-name" + "main": "./lib/index.js", + "dependencies": { + "@babel/template": "^7.20.7", + "@babel/types": "^7.21.0" + }, + "engines": { + "node": ">=6.9.0" }, - "version": "7.12.13" -} + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file 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 8fa48c13..00000000 --- a/node_modules/@babel/helper-get-function-arity/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-get-function-arity - -> Helper function to get function arity - -See our website [@babel/helper-get-function-arity](https://babeljs.io/docs/en/babel-helper-get-function-arity) 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/helper-get-function-arity/lib/index.js b/node_modules/@babel/helper-get-function-arity/lib/index.js deleted file mode 100644 index 46e71dce..00000000 --- a/node_modules/@babel/helper-get-function-arity/lib/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } 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/helper-get-function-arity/package.json b/node_modules/@babel/helper-get-function-arity/package.json deleted file mode 100644 index 594cffb2..00000000 --- a/node_modules/@babel/helper-get-function-arity/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "_from": "@babel/helper-get-function-arity@^7.12.13", - "_id": "@babel/helper-get-function-arity@7.12.13", - "_inBundle": false, - "_integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", - "_location": "/@babel/helper-get-function-arity", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-get-function-arity@^7.12.13", - "name": "@babel/helper-get-function-arity", - "escapedName": "@babel%2fhelper-get-function-arity", - "scope": "@babel", - "rawSpec": "^7.12.13", - "saveSpec": null, - "fetchSpec": "^7.12.13" - }, - "_requiredBy": [ - "/@babel/helper-function-name" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "_shasum": "bc63451d403a3b3082b97e1d8b3fe5bd4091e583", - "_spec": "@babel/helper-get-function-arity@^7.12.13", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/helper-function-name", - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.12.13" - }, - "deprecated": false, - "description": "Helper function to get function arity", - "homepage": "https://babel.dev/docs/en/next/babel-helper-get-function-arity", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-get-function-arity", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-get-function-arity" - }, - "version": "7.12.13" -} diff --git a/node_modules/@babel/helper-member-expression-to-functions/LICENSE b/node_modules/@babel/helper-hoist-variables/LICENSE similarity index 100% rename from node_modules/@babel/helper-member-expression-to-functions/LICENSE rename to node_modules/@babel/helper-hoist-variables/LICENSE diff --git a/node_modules/@babel/helper-hoist-variables/README.md b/node_modules/@babel/helper-hoist-variables/README.md new file mode 100644 index 00000000..ef878210 --- /dev/null +++ b/node_modules/@babel/helper-hoist-variables/README.md @@ -0,0 +1,19 @@ +# @babel/helper-hoist-variables + +> Helper function to hoist variables + +See our website [@babel/helper-hoist-variables](https://babeljs.io/docs/en/babel-helper-hoist-variables) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-hoist-variables +``` + +or using yarn: + +```sh +yarn add @babel/helper-hoist-variables +``` diff --git a/node_modules/@babel/helper-hoist-variables/lib/index.js b/node_modules/@babel/helper-hoist-variables/lib/index.js new file mode 100644 index 00000000..31fb8470 --- /dev/null +++ b/node_modules/@babel/helper-hoist-variables/lib/index.js @@ -0,0 +1,58 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = hoistVariables; + +var _t = require("@babel/types"); + +const { + assignmentExpression, + expressionStatement, + identifier +} = _t; +const visitor = { + Scope(path, state) { + if (state.kind === "let") path.skip(); + }, + + FunctionParent(path) { + path.skip(); + }, + + VariableDeclaration(path, state) { + if (state.kind && path.node.kind !== state.kind) return; + const nodes = []; + const declarations = path.get("declarations"); + let firstId; + + for (const declar of declarations) { + firstId = declar.node.id; + + if (declar.node.init) { + nodes.push(expressionStatement(assignmentExpression("=", declar.node.id, declar.node.init))); + } + + for (const name of Object.keys(declar.getBindingIdentifiers())) { + state.emit(identifier(name), name, declar.node.init !== null); + } + } + + if (path.parentPath.isFor({ + left: path.node + })) { + path.replaceWith(firstId); + } else { + path.replaceWithMultiple(nodes); + } + } + +}; + +function hoistVariables(path, emit, kind = "var") { + path.traverse(visitor, { + kind, + emit + }); +} \ No newline at end of file diff --git a/node_modules/@babel/helper-hoist-variables/package.json b/node_modules/@babel/helper-hoist-variables/package.json new file mode 100644 index 00000000..0d925300 --- /dev/null +++ b/node_modules/@babel/helper-hoist-variables/package.json @@ -0,0 +1,28 @@ +{ + "name": "@babel/helper-hoist-variables", + "version": "7.18.6", + "description": "Helper function to hoist variables", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-hoist-variables" + }, + "homepage": "https://babel.dev/docs/en/next/babel-helper-hoist-variables", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/types": "^7.18.6" + }, + "TODO": "The @babel/traverse dependency is only needed for the NodePath TS type. We can consider exporting it from @babel/core.", + "devDependencies": { + "@babel/traverse": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-member-expression-to-functions/README.md b/node_modules/@babel/helper-member-expression-to-functions/README.md deleted file mode 100644 index 01c551d6..00000000 --- a/node_modules/@babel/helper-member-expression-to-functions/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-member-expression-to-functions - -> Helper function to replace certain member expressions with function calls - -See our website [@babel/helper-member-expression-to-functions](https://babeljs.io/docs/en/babel-helper-member-expression-to-functions) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-member-expression-to-functions -``` - -or using yarn: - -```sh -yarn add @babel/helper-member-expression-to-functions --dev -``` diff --git a/node_modules/@babel/helper-member-expression-to-functions/lib/index.js b/node_modules/@babel/helper-member-expression-to-functions/lib/index.js deleted file mode 100644 index b69fa2f6..00000000 --- a/node_modules/@babel/helper-member-expression-to-functions/lib/index.js +++ /dev/null @@ -1,403 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var t = require('@babel/types'); - -function willPathCastToBoolean(path) { - const maybeWrapped = path; - const { - node, - parentPath - } = maybeWrapped; - - if (parentPath.isLogicalExpression()) { - const { - operator, - right - } = parentPath.node; - - if (operator === "&&" || operator === "||" || operator === "??" && node === right) { - return willPathCastToBoolean(parentPath); - } - } - - if (parentPath.isSequenceExpression()) { - const { - expressions - } = parentPath.node; - - if (expressions[expressions.length - 1] === node) { - return willPathCastToBoolean(parentPath); - } else { - return true; - } - } - - return parentPath.isConditional({ - test: node - }) || parentPath.isUnaryExpression({ - operator: "!" - }) || parentPath.isLoop({ - test: node - }); -} - -class AssignmentMemoiser { - constructor() { - this._map = void 0; - this._map = new WeakMap(); - } - - has(key) { - return this._map.has(key); - } - - get(key) { - if (!this.has(key)) return; - - const record = this._map.get(key); - - const { - value - } = record; - record.count--; - - if (record.count === 0) { - return t.assignmentExpression("=", value, key); - } - - return value; - } - - set(key, value, count) { - return this._map.set(key, { - count, - value - }); - } - -} - -function toNonOptional(path, base) { - const { - node - } = path; - - if (path.isOptionalMemberExpression()) { - return t.memberExpression(base, node.property, node.computed); - } - - if (path.isOptionalCallExpression()) { - const callee = path.get("callee"); - - if (path.node.optional && callee.isOptionalMemberExpression()) { - const { - object - } = callee.node; - const context = path.scope.maybeGenerateMemoised(object) || object; - callee.get("object").replaceWith(t.assignmentExpression("=", context, object)); - return t.callExpression(t.memberExpression(base, t.identifier("call")), [context, ...node.arguments]); - } - - return t.callExpression(base, node.arguments); - } - - return path.node; -} - -function isInDetachedTree(path) { - while (path) { - if (path.isProgram()) break; - const { - parentPath, - container, - listKey - } = path; - const parentNode = parentPath.node; - - if (listKey) { - if (container !== parentNode[listKey]) return true; - } else { - if (container !== parentNode) return true; - } - - path = parentPath; - } - - return false; -} - -const handle = { - memoise() {}, - - handle(member, noDocumentAll) { - const { - node, - parent, - parentPath, - scope - } = member; - - if (member.isOptionalMemberExpression()) { - if (isInDetachedTree(member)) return; - const endPath = member.find(({ - node, - parent, - parentPath - }) => { - if (parentPath.isOptionalMemberExpression()) { - return parent.optional || parent.object !== node; - } - - if (parentPath.isOptionalCallExpression()) { - return node !== member.node && parent.optional || parent.callee !== node; - } - - return true; - }); - - if (scope.path.isPattern()) { - endPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], endPath.node), [])); - return; - } - - const willEndPathCastToBoolean = willPathCastToBoolean(endPath); - const rootParentPath = endPath.parentPath; - - if (rootParentPath.isUpdateExpression({ - argument: node - }) || rootParentPath.isAssignmentExpression({ - left: node - })) { - throw member.buildCodeFrameError(`can't handle assignment`); - } - - const isDeleteOperation = rootParentPath.isUnaryExpression({ - operator: "delete" - }); - - if (isDeleteOperation && endPath.isOptionalMemberExpression() && endPath.get("property").isPrivateName()) { - throw member.buildCodeFrameError(`can't delete a private class element`); - } - - let startingOptional = member; - - for (;;) { - if (startingOptional.isOptionalMemberExpression()) { - if (startingOptional.node.optional) break; - startingOptional = startingOptional.get("object"); - continue; - } else if (startingOptional.isOptionalCallExpression()) { - if (startingOptional.node.optional) break; - startingOptional = startingOptional.get("callee"); - continue; - } - - throw new Error(`Internal error: unexpected ${startingOptional.node.type}`); - } - - const startingProp = startingOptional.isOptionalMemberExpression() ? "object" : "callee"; - const startingNode = startingOptional.node[startingProp]; - const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode); - const baseRef = baseNeedsMemoised != null ? baseNeedsMemoised : startingNode; - const parentIsOptionalCall = parentPath.isOptionalCallExpression({ - callee: node - }); - const parentIsCall = parentPath.isCallExpression({ - callee: node - }); - startingOptional.replaceWith(toNonOptional(startingOptional, baseRef)); - - if (parentIsOptionalCall) { - if (parent.optional) { - parentPath.replaceWith(this.optionalCall(member, parent.arguments)); - } else { - parentPath.replaceWith(this.call(member, parent.arguments)); - } - } else if (parentIsCall) { - member.replaceWith(this.boundGet(member)); - } else { - member.replaceWith(this.get(member)); - } - - let regular = member.node; - - for (let current = member; current !== endPath;) { - const { - parentPath - } = current; - - if (parentPath === endPath && parentIsOptionalCall && parent.optional) { - regular = parentPath.node; - break; - } - - regular = toNonOptional(parentPath, regular); - current = parentPath; - } - - let context; - const endParentPath = endPath.parentPath; - - if (t.isMemberExpression(regular) && endParentPath.isOptionalCallExpression({ - callee: endPath.node, - optional: true - })) { - const { - object - } = regular; - context = member.scope.maybeGenerateMemoised(object); - - if (context) { - regular.object = t.assignmentExpression("=", context, object); - } - } - - let replacementPath = endPath; - - if (isDeleteOperation) { - replacementPath = endParentPath; - regular = endParentPath.node; - } - - const baseMemoised = baseNeedsMemoised ? t.assignmentExpression("=", t.cloneNode(baseRef), t.cloneNode(startingNode)) : t.cloneNode(baseRef); - - if (willEndPathCastToBoolean) { - let nonNullishCheck; - - if (noDocumentAll) { - nonNullishCheck = t.binaryExpression("!=", baseMemoised, t.nullLiteral()); - } else { - nonNullishCheck = t.logicalExpression("&&", t.binaryExpression("!==", baseMemoised, t.nullLiteral()), t.binaryExpression("!==", t.cloneNode(baseRef), scope.buildUndefinedNode())); - } - - replacementPath.replaceWith(t.logicalExpression("&&", nonNullishCheck, regular)); - } else { - let nullishCheck; - - if (noDocumentAll) { - nullishCheck = t.binaryExpression("==", baseMemoised, t.nullLiteral()); - } else { - nullishCheck = t.logicalExpression("||", t.binaryExpression("===", baseMemoised, t.nullLiteral()), t.binaryExpression("===", t.cloneNode(baseRef), scope.buildUndefinedNode())); - } - - replacementPath.replaceWith(t.conditionalExpression(nullishCheck, isDeleteOperation ? t.booleanLiteral(true) : scope.buildUndefinedNode(), regular)); - } - - if (context) { - const endParent = endParentPath.node; - endParentPath.replaceWith(t.optionalCallExpression(t.optionalMemberExpression(endParent.callee, t.identifier("call"), false, true), [t.cloneNode(context), ...endParent.arguments], false)); - } - - return; - } - - if (parentPath.isUpdateExpression({ - argument: node - })) { - if (this.simpleSet) { - member.replaceWith(this.simpleSet(member)); - return; - } - - const { - operator, - prefix - } = parent; - this.memoise(member, 2); - const value = t.binaryExpression(operator[0], t.unaryExpression("+", this.get(member)), t.numericLiteral(1)); - - if (prefix) { - parentPath.replaceWith(this.set(member, value)); - } else { - const { - scope - } = member; - const ref = scope.generateUidIdentifierBasedOnNode(node); - scope.push({ - id: ref - }); - value.left = t.assignmentExpression("=", t.cloneNode(ref), value.left); - parentPath.replaceWith(t.sequenceExpression([this.set(member, value), t.cloneNode(ref)])); - } - - return; - } - - if (parentPath.isAssignmentExpression({ - left: node - })) { - if (this.simpleSet) { - member.replaceWith(this.simpleSet(member)); - return; - } - - const { - operator, - right: value - } = parent; - - if (operator === "=") { - parentPath.replaceWith(this.set(member, value)); - } else { - const operatorTrunc = operator.slice(0, -1); - - if (t.LOGICAL_OPERATORS.includes(operatorTrunc)) { - this.memoise(member, 1); - parentPath.replaceWith(t.logicalExpression(operatorTrunc, this.get(member), this.set(member, value))); - } else { - this.memoise(member, 2); - parentPath.replaceWith(this.set(member, t.binaryExpression(operatorTrunc, this.get(member), value))); - } - } - - return; - } - - if (parentPath.isCallExpression({ - callee: node - })) { - parentPath.replaceWith(this.call(member, parent.arguments)); - return; - } - - if (parentPath.isOptionalCallExpression({ - callee: node - })) { - if (scope.path.isPattern()) { - parentPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], parentPath.node), [])); - return; - } - - parentPath.replaceWith(this.optionalCall(member, parent.arguments)); - return; - } - - if (parentPath.isForXStatement({ - left: node - }) || parentPath.isObjectProperty({ - value: node - }) && parentPath.parentPath.isObjectPattern() || parentPath.isAssignmentPattern({ - left: node - }) && parentPath.parentPath.isObjectProperty({ - value: parent - }) && parentPath.parentPath.parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isAssignmentPattern({ - left: node - }) && parentPath.parentPath.isArrayPattern() || parentPath.isRestElement()) { - member.replaceWith(this.destructureSet(member)); - return; - } - - member.replaceWith(this.get(member)); - } - -}; -function memberExpressionToFunctions(path, visitor, state) { - path.traverse(visitor, Object.assign({}, handle, state, { - memoiser: new AssignmentMemoiser() - })); -} - -exports.default = memberExpressionToFunctions; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-member-expression-to-functions/lib/index.js.map b/node_modules/@babel/helper-member-expression-to-functions/lib/index.js.map deleted file mode 100644 index 860febcf..00000000 --- a/node_modules/@babel/helper-member-expression-to-functions/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/util.ts","../src/index.ts"],"sourcesContent":["import type { NodePath } from \"@babel/traverse\";\n\n/**\n * Test if a NodePath will be cast to boolean when evaluated.\n *\n * @example\n * // returns true\n * const nodePathAQDotB = NodePath(\"if (a?.#b) {}\").get(\"test\"); // a?.#b\n * willPathCastToBoolean(nodePathAQDotB)\n * @example\n * // returns false\n * willPathCastToBoolean(NodePath(\"a?.#b\"))\n * @todo Respect transparent expression wrappers\n * @see {@link packages/babel-plugin-proposal-optional-chaining/src/util.js}\n * @param {NodePath} path\n * @returns {boolean}\n */\nexport function willPathCastToBoolean(path: NodePath): boolean {\n const maybeWrapped = path;\n const { node, parentPath } = maybeWrapped;\n if (parentPath.isLogicalExpression()) {\n const { operator, right } = parentPath.node;\n if (\n operator === \"&&\" ||\n operator === \"||\" ||\n (operator === \"??\" && node === right)\n ) {\n return willPathCastToBoolean(parentPath);\n }\n }\n if (parentPath.isSequenceExpression()) {\n const { expressions } = parentPath.node;\n if (expressions[expressions.length - 1] === node) {\n return willPathCastToBoolean(parentPath);\n } else {\n // if it is in the middle of a sequence expression, we don't\n // care the return value so just cast to boolean for smaller\n // output\n return true;\n }\n }\n return (\n parentPath.isConditional({ test: node }) ||\n parentPath.isUnaryExpression({ operator: \"!\" }) ||\n parentPath.isLoop({ test: node })\n );\n}\n","import * as t from \"@babel/types\";\nimport { willPathCastToBoolean } from \"./util\";\n\nclass AssignmentMemoiser {\n private _map: WeakMap;\n constructor() {\n this._map = new WeakMap();\n }\n\n has(key) {\n return this._map.has(key);\n }\n\n get(key) {\n if (!this.has(key)) return;\n\n const record = this._map.get(key);\n const { value } = record;\n\n record.count--;\n if (record.count === 0) {\n // The `count` access is the outermost function call (hopefully), so it\n // does the assignment.\n return t.assignmentExpression(\"=\", value, key);\n }\n return value;\n }\n\n set(key, value, count) {\n return this._map.set(key, { count, value });\n }\n}\n\nfunction toNonOptional(path, base) {\n const { node } = path;\n if (path.isOptionalMemberExpression()) {\n return t.memberExpression(base, node.property, node.computed);\n }\n\n if (path.isOptionalCallExpression()) {\n const callee = path.get(\"callee\");\n if (path.node.optional && callee.isOptionalMemberExpression()) {\n const { object } = callee.node;\n const context = path.scope.maybeGenerateMemoised(object) || object;\n callee\n .get(\"object\")\n .replaceWith(t.assignmentExpression(\"=\", context, object));\n\n return t.callExpression(t.memberExpression(base, t.identifier(\"call\")), [\n context,\n ...node.arguments,\n ]);\n }\n\n return t.callExpression(base, node.arguments);\n }\n\n return path.node;\n}\n\n// Determines if the current path is in a detached tree. This can happen when\n// we are iterating on a path, and replace an ancestor with a new node. Babel\n// doesn't always stop traversing the old node tree, and that can cause\n// inconsistencies.\nfunction isInDetachedTree(path) {\n while (path) {\n if (path.isProgram()) break;\n\n const { parentPath, container, listKey } = path;\n const parentNode = parentPath.node;\n if (listKey) {\n if (container !== parentNode[listKey]) return true;\n } else {\n if (container !== parentNode) return true;\n }\n\n path = parentPath;\n }\n\n return false;\n}\n\nconst handle = {\n memoise() {\n // noop.\n },\n\n // todo(flow->ts) member:NodePath, refactor function body to avoid too many typecasts\n handle(member: any, noDocumentAll: boolean) {\n const { node, parent, parentPath, scope } = member;\n\n if (member.isOptionalMemberExpression()) {\n // Transforming optional chaining requires we replace ancestors.\n if (isInDetachedTree(member)) return;\n\n // We're looking for the end of _this_ optional chain, which is actually\n // the \"rightmost\" property access of the chain. This is because\n // everything up to that property access is \"optional\".\n //\n // Let's take the case of `FOO?.BAR.baz?.qux`, with `FOO?.BAR` being our\n // member. The \"end\" to most users would be `qux` property access.\n // Everything up to it could be skipped if it `FOO` were nullish. But\n // actually, we can consider the `baz` access to be the end. So we're\n // looking for the nearest optional chain that is `optional: true`.\n const endPath = member.find(({ node, parent, parentPath }) => {\n if (parentPath.isOptionalMemberExpression()) {\n // We need to check `parent.object` since we could be inside the\n // computed expression of a `bad?.[FOO?.BAR]`. In this case, the\n // endPath is the `FOO?.BAR` member itself.\n return parent.optional || parent.object !== node;\n }\n if (parentPath.isOptionalCallExpression()) {\n // Checking `parent.callee` since we could be in the arguments, eg\n // `bad?.(FOO?.BAR)`.\n // Also skip `FOO?.BAR` in `FOO?.BAR?.()` since we need to transform the optional call to ensure proper this\n return (\n // In FOO?.#BAR?.(), endPath points the optional call expression so we skip FOO?.#BAR\n (node !== member.node && parent.optional) || parent.callee !== node\n );\n }\n return true;\n });\n\n // Replace `function (a, x = a.b?.#c) {}` to `function (a, x = (() => a.b?.#c)() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unecessary IIFE\n if (scope.path.isPattern()) {\n endPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n t.callExpression(t.arrowFunctionExpression([], endPath.node), []),\n );\n return;\n }\n\n const willEndPathCastToBoolean = willPathCastToBoolean(endPath);\n\n const rootParentPath = endPath.parentPath;\n if (\n rootParentPath.isUpdateExpression({ argument: node }) ||\n rootParentPath.isAssignmentExpression({ left: node })\n ) {\n throw member.buildCodeFrameError(`can't handle assignment`);\n }\n const isDeleteOperation = rootParentPath.isUnaryExpression({\n operator: \"delete\",\n });\n if (\n isDeleteOperation &&\n endPath.isOptionalMemberExpression() &&\n endPath.get(\"property\").isPrivateName()\n ) {\n // @babel/parser will throw error on `delete obj?.#x`.\n // This error serves as fallback when `delete obj?.#x` is constructed from babel types\n throw member.buildCodeFrameError(\n `can't delete a private class element`,\n );\n }\n\n // Now, we're looking for the start of this optional chain, which is\n // optional to the left of this member.\n //\n // Let's take the case of `foo?.bar?.baz.QUX?.BAM`, with `QUX?.BAM` being\n // our member. The \"start\" to most users would be `foo` object access.\n // But actually, we can consider the `bar` access to be the start. So\n // we're looking for the nearest optional chain that is `optional: true`,\n // which is guaranteed to be somewhere in the object/callee tree.\n let startingOptional = member;\n for (;;) {\n if (startingOptional.isOptionalMemberExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"object\");\n continue;\n } else if (startingOptional.isOptionalCallExpression()) {\n if (startingOptional.node.optional) break;\n startingOptional = startingOptional.get(\"callee\");\n continue;\n }\n // prevent infinite loop: unreachable if the AST is well-formed\n throw new Error(\n `Internal error: unexpected ${startingOptional.node.type}`,\n );\n }\n\n const startingProp = startingOptional.isOptionalMemberExpression()\n ? \"object\"\n : \"callee\";\n const startingNode = startingOptional.node[startingProp];\n const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);\n const baseRef = baseNeedsMemoised ?? startingNode;\n\n // Compute parentIsOptionalCall before `startingOptional` is replaced\n // as `node` may refer to `startingOptional.node` before replaced.\n const parentIsOptionalCall = parentPath.isOptionalCallExpression({\n callee: node,\n });\n // if parentIsCall is true, it implies that node.extra.parenthesized is always true\n const parentIsCall = parentPath.isCallExpression({ callee: node });\n startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));\n if (parentIsOptionalCall) {\n if (parent.optional) {\n parentPath.replaceWith(this.optionalCall(member, parent.arguments));\n } else {\n parentPath.replaceWith(this.call(member, parent.arguments));\n }\n } else if (parentIsCall) {\n // `(a?.#b)()` to `(a == null ? void 0 : a.#b.bind(a))()`\n member.replaceWith(this.boundGet(member));\n } else {\n member.replaceWith(this.get(member));\n }\n\n let regular = member.node;\n for (let current = member; current !== endPath; ) {\n const { parentPath } = current;\n // skip transforming `Foo.#BAR?.call(FOO)`\n if (parentPath === endPath && parentIsOptionalCall && parent.optional) {\n regular = parentPath.node;\n break;\n }\n regular = toNonOptional(parentPath, regular);\n current = parentPath;\n }\n\n let context;\n const endParentPath = endPath.parentPath;\n if (\n t.isMemberExpression(regular) &&\n endParentPath.isOptionalCallExpression({\n callee: endPath.node,\n optional: true,\n })\n ) {\n const { object } = regular;\n context = member.scope.maybeGenerateMemoised(object);\n if (context) {\n regular.object = t.assignmentExpression(\"=\", context, object);\n }\n }\n\n let replacementPath = endPath;\n if (isDeleteOperation) {\n replacementPath = endParentPath;\n regular = endParentPath.node;\n }\n\n const baseMemoised = baseNeedsMemoised\n ? t.assignmentExpression(\n \"=\",\n t.cloneNode(baseRef),\n t.cloneNode(startingNode),\n )\n : t.cloneNode(baseRef);\n\n if (willEndPathCastToBoolean) {\n let nonNullishCheck;\n if (noDocumentAll) {\n nonNullishCheck = t.binaryExpression(\n \"!=\",\n baseMemoised,\n t.nullLiteral(),\n );\n } else {\n nonNullishCheck = t.logicalExpression(\n \"&&\",\n t.binaryExpression(\"!==\", baseMemoised, t.nullLiteral()),\n t.binaryExpression(\n \"!==\",\n t.cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n replacementPath.replaceWith(\n t.logicalExpression(\"&&\", nonNullishCheck, regular),\n );\n } else {\n let nullishCheck;\n if (noDocumentAll) {\n nullishCheck = t.binaryExpression(\n \"==\",\n baseMemoised,\n t.nullLiteral(),\n );\n } else {\n nullishCheck = t.logicalExpression(\n \"||\",\n t.binaryExpression(\"===\", baseMemoised, t.nullLiteral()),\n t.binaryExpression(\n \"===\",\n t.cloneNode(baseRef),\n scope.buildUndefinedNode(),\n ),\n );\n }\n\n replacementPath.replaceWith(\n t.conditionalExpression(\n nullishCheck,\n isDeleteOperation\n ? t.booleanLiteral(true)\n : scope.buildUndefinedNode(),\n regular,\n ),\n );\n }\n\n // context and isDeleteOperation can not be both truthy\n if (context) {\n const endParent = endParentPath.node;\n endParentPath.replaceWith(\n t.optionalCallExpression(\n t.optionalMemberExpression(\n endParent.callee,\n t.identifier(\"call\"),\n false,\n true,\n ),\n [t.cloneNode(context), ...endParent.arguments],\n false,\n ),\n );\n }\n\n return;\n }\n\n // MEMBER++ -> _set(MEMBER, (_ref = (+_get(MEMBER))) + 1), _ref\n // ++MEMBER -> _set(MEMBER, (+_get(MEMBER)) + 1)\n if (parentPath.isUpdateExpression({ argument: node })) {\n if (this.simpleSet) {\n member.replaceWith(this.simpleSet(member));\n return;\n }\n\n const { operator, prefix } = parent;\n\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The second access (the set) should do the memo\n // assignment.\n this.memoise(member, 2);\n\n const value = t.binaryExpression(\n operator[0],\n t.unaryExpression(\"+\", this.get(member)),\n t.numericLiteral(1),\n );\n\n if (prefix) {\n parentPath.replaceWith(this.set(member, value));\n } else {\n const { scope } = member;\n const ref = scope.generateUidIdentifierBasedOnNode(node);\n scope.push({ id: ref });\n\n value.left = t.assignmentExpression(\n \"=\",\n t.cloneNode(ref),\n // @ts-expect-error todo(flow->ts) value.left is possibly PrivateName, which is not usable here\n value.left,\n );\n\n parentPath.replaceWith(\n t.sequenceExpression([this.set(member, value), t.cloneNode(ref)]),\n );\n }\n return;\n }\n\n // MEMBER = VALUE -> _set(MEMBER, VALUE)\n // MEMBER += VALUE -> _set(MEMBER, _get(MEMBER) + VALUE)\n // MEMBER ??= VALUE -> _get(MEMBER) ?? _set(MEMBER, VALUE)\n if (parentPath.isAssignmentExpression({ left: node })) {\n if (this.simpleSet) {\n member.replaceWith(this.simpleSet(member));\n return;\n }\n\n const { operator, right: value } = parent;\n\n if (operator === \"=\") {\n parentPath.replaceWith(this.set(member, value));\n } else {\n const operatorTrunc = operator.slice(0, -1);\n if (t.LOGICAL_OPERATORS.includes(operatorTrunc)) {\n // Give the state handler a chance to memoise the member, since we'll\n // reference it twice. The first access (the get) should do the memo\n // assignment.\n this.memoise(member, 1);\n parentPath.replaceWith(\n t.logicalExpression(\n operatorTrunc,\n this.get(member),\n this.set(member, value),\n ),\n );\n } else {\n // Here, the second access (the set) is evaluated first.\n this.memoise(member, 2);\n parentPath.replaceWith(\n this.set(\n member,\n t.binaryExpression(operatorTrunc, this.get(member), value),\n ),\n );\n }\n }\n return;\n }\n\n // MEMBER(ARGS) -> _call(MEMBER, ARGS)\n if (parentPath.isCallExpression({ callee: node })) {\n parentPath.replaceWith(this.call(member, parent.arguments));\n return;\n }\n\n // MEMBER?.(ARGS) -> _optionalCall(MEMBER, ARGS)\n if (parentPath.isOptionalCallExpression({ callee: node })) {\n // Replace `function (a, x = a.b.#c?.()) {}` to `function (a, x = (() => a.b.#c?.())() ){}`\n // so the temporary variable can be injected in correct scope\n // This can be further optimized to avoid unecessary IIFE\n if (scope.path.isPattern()) {\n parentPath.replaceWith(\n // The injected member will be queued and eventually transformed when visited\n t.callExpression(t.arrowFunctionExpression([], parentPath.node), []),\n );\n return;\n }\n parentPath.replaceWith(this.optionalCall(member, parent.arguments));\n return;\n }\n\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n // { KEY: MEMBER } = OBJ -> { KEY: _destructureSet(MEMBER) } = OBJ\n // { KEY: MEMBER = _VALUE } = OBJ -> { KEY: _destructureSet(MEMBER) = _VALUE } = OBJ\n // {...MEMBER} -> {..._destructureSet(MEMBER)}\n //\n // [MEMBER] = ARR -> [_destructureSet(MEMBER)] = ARR\n // [MEMBER = _VALUE] = ARR -> [_destructureSet(MEMBER) = _VALUE] = ARR\n // [...MEMBER] -> [..._destructureSet(MEMBER)]\n if (\n // for (MEMBER of ARR)\n // for (MEMBER in ARR)\n parentPath.isForXStatement({ left: node }) ||\n // { KEY: MEMBER } = OBJ\n (parentPath.isObjectProperty({ value: node }) &&\n parentPath.parentPath.isObjectPattern()) ||\n // { KEY: MEMBER = _VALUE } = OBJ\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isObjectProperty({ value: parent }) &&\n parentPath.parentPath.parentPath.isObjectPattern()) ||\n // [MEMBER] = ARR\n parentPath.isArrayPattern() ||\n // [MEMBER = _VALUE] = ARR\n (parentPath.isAssignmentPattern({ left: node }) &&\n parentPath.parentPath.isArrayPattern()) ||\n // {...MEMBER}\n // [...MEMBER]\n parentPath.isRestElement()\n ) {\n member.replaceWith(this.destructureSet(member));\n return;\n }\n\n // MEMBER -> _get(MEMBER)\n member.replaceWith(this.get(member));\n },\n};\n\n// We do not provide a default traversal visitor\n// Instead, caller passes one, and must call `state.handle` on the members\n// it wishes to be transformed.\n// Additionally, the caller must pass in a state object with at least\n// get, set, and call methods.\n// Optionally, a memoise method may be defined on the state, which will be\n// called when the member is a self-referential update.\nexport default function memberExpressionToFunctions(path, visitor, state) {\n path.traverse(visitor, {\n ...handle,\n ...state,\n memoiser: new AssignmentMemoiser(),\n });\n}\n"],"names":["willPathCastToBoolean","path","maybeWrapped","node","parentPath","isLogicalExpression","operator","right","isSequenceExpression","expressions","length","isConditional","test","isUnaryExpression","isLoop","AssignmentMemoiser","constructor","_map","WeakMap","has","key","get","record","value","count","t","set","toNonOptional","base","isOptionalMemberExpression","property","computed","isOptionalCallExpression","callee","optional","object","context","scope","maybeGenerateMemoised","replaceWith","arguments","isInDetachedTree","isProgram","container","listKey","parentNode","handle","memoise","member","noDocumentAll","parent","endPath","find","isPattern","willEndPathCastToBoolean","rootParentPath","isUpdateExpression","argument","isAssignmentExpression","left","buildCodeFrameError","isDeleteOperation","isPrivateName","startingOptional","Error","type","startingProp","startingNode","baseNeedsMemoised","baseRef","parentIsOptionalCall","parentIsCall","isCallExpression","optionalCall","call","boundGet","regular","current","endParentPath","replacementPath","baseMemoised","nonNullishCheck","buildUndefinedNode","nullishCheck","endParent","simpleSet","prefix","ref","generateUidIdentifierBasedOnNode","push","id","operatorTrunc","slice","includes","isForXStatement","isObjectProperty","isObjectPattern","isAssignmentPattern","isArrayPattern","isRestElement","destructureSet","memberExpressionToFunctions","visitor","state","traverse","memoiser"],"mappings":";;;;;;AAiBO,SAASA,qBAAT,CAA+BC,IAA/B,EAAwD;AAC7D,QAAMC,YAAY,GAAGD,IAArB;AACA,QAAM;AAAEE,IAAAA,IAAF;AAAQ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tB,EAHF,IAKC5F,UAAU,CAAC6F,mBAAX,CAA+B;AAAEtC,MAAAA,IAAI,EAAExD;AAAR,KAA/B,KACCC,UAAU,CAACA,UAAX,CAAsB2F,gBAAtB,CAAuC;AAAExE,MAAAA,KAAK,EAAE2B;AAAT,KAAvC,CADD,IAEC9C,UAAU,CAACA,UAAX,CAAsBA,UAAtB,CAAiC4F,eAAjC,EAPF,IASA5F,UAAU,CAAC8F,cAAX,EATA,IAWC9F,UAAU,CAAC6F,mBAAX,CAA+B;AAAEtC,MAAAA,IAAI,EAAExD;AAAR,KAA/B,KACCC,UAAU,CAACA,UAAX,CAAsB8F,cAAtB,EAZF,IAeA9F,UAAU,CAAC+F,aAAX,EAlBF,EAmBE;AACAnD,MAAAA,MAAM,CAACT,WAAP,CAAmB,KAAK6D,cAAL,CAAoBpD,MAApB,CAAnB;AACA;AACD;;AAGDA,IAAAA,MAAM,CAACT,WAAP,CAAmB,KAAKlB,GAAL,CAAS2B,MAAT,CAAnB;AACD;;AAhYY,CAAf;AA0Ye,SAASqD,2BAAT,CAAqCpG,IAArC,EAA2CqG,OAA3C,EAAoDC,KAApD,EAA2D;AACxEtG,EAAAA,IAAI,CAACuG,QAAL,CAAcF,OAAd,oBACKxD,MADL,EAEKyD,KAFL;AAGEE,IAAAA,QAAQ,EAAE,IAAI1F,kBAAJ;AAHZ;AAKD;;;;"} \ No newline at end of file diff --git a/node_modules/@babel/helper-member-expression-to-functions/package.json b/node_modules/@babel/helper-member-expression-to-functions/package.json deleted file mode 100644 index 2f798969..00000000 --- a/node_modules/@babel/helper-member-expression-to-functions/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "@babel/helper-member-expression-to-functions@^7.13.12", - "_id": "@babel/helper-member-expression-to-functions@7.13.12", - "_inBundle": false, - "_integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", - "_location": "/@babel/helper-member-expression-to-functions", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-member-expression-to-functions@^7.13.12", - "name": "@babel/helper-member-expression-to-functions", - "escapedName": "@babel%2fhelper-member-expression-to-functions", - "scope": "@babel", - "rawSpec": "^7.13.12", - "saveSpec": null, - "fetchSpec": "^7.13.12" - }, - "_requiredBy": [ - "/@babel/helper-replace-supers" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "_shasum": "dfe368f26d426a07299d8d6513821768216e6d72", - "_spec": "@babel/helper-member-expression-to-functions@^7.13.12", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/helper-replace-supers", - "author": { - "name": "Justin Ridgewell", - "email": "justin@ridgewell.name" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.13.12" - }, - "deprecated": false, - "description": "Helper function to replace certain member expressions with function calls", - "devDependencies": { - "@babel/traverse": "^7.12.17" - }, - "homepage": "https://babel.dev/docs/en/next/babel-helper-member-expression-to-functions", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-member-expression-to-functions", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-member-expression-to-functions" - }, - "version": "7.13.12" -} diff --git a/node_modules/@babel/helper-module-imports/README.md b/node_modules/@babel/helper-module-imports/README.md index dfc0bb88..933c5b75 100644 --- a/node_modules/@babel/helper-module-imports/README.md +++ b/node_modules/@babel/helper-module-imports/README.md @@ -9,11 +9,11 @@ See our website [@babel/helper-module-imports](https://babeljs.io/docs/en/babel- Using npm: ```sh -npm install --save-dev @babel/helper-module-imports +npm install --save @babel/helper-module-imports ``` or using yarn: ```sh -yarn add @babel/helper-module-imports --dev +yarn add @babel/helper-module-imports ``` diff --git a/node_modules/@babel/helper-module-imports/lib/import-builder.js b/node_modules/@babel/helper-module-imports/lib/import-builder.js index a14325b4..b01187f9 100644 --- a/node_modules/@babel/helper-module-imports/lib/import-builder.js +++ b/node_modules/@babel/helper-module-imports/lib/import-builder.js @@ -4,136 +4,119 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const assert = require("assert"); - +var _assert = require("assert"); +var _t = require("@babel/types"); +const { + callExpression, + cloneNode, + expressionStatement, + identifier, + importDeclaration, + importDefaultSpecifier, + importNamespaceSpecifier, + importSpecifier, + memberExpression, + stringLiteral, + variableDeclaration, + variableDeclarator +} = _t; class ImportBuilder { constructor(importedSource, scope, hub) { this._statements = []; this._resultName = null; - this._scope = null; - this._hub = null; this._importedSource = void 0; this._scope = scope; this._hub = hub; this._importedSource = importedSource; } - done() { return { statements: this._statements, resultName: this._resultName }; } - import() { - this._statements.push(t.importDeclaration([], t.stringLiteral(this._importedSource))); - + this._statements.push(importDeclaration([], stringLiteral(this._importedSource))); return this; } - require() { - this._statements.push(t.expressionStatement(t.callExpression(t.identifier("require"), [t.stringLiteral(this._importedSource)]))); - + this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral(this._importedSource)]))); return this; } - namespace(name = "namespace") { const local = this._scope.generateUidIdentifier(name); - const statement = this._statements[this._statements.length - 1]; - assert(statement.type === "ImportDeclaration"); - assert(statement.specifiers.length === 0); - statement.specifiers = [t.importNamespaceSpecifier(local)]; - this._resultName = t.cloneNode(local); + _assert(statement.type === "ImportDeclaration"); + _assert(statement.specifiers.length === 0); + statement.specifiers = [importNamespaceSpecifier(local)]; + this._resultName = cloneNode(local); return this; } - default(name) { - name = this._scope.generateUidIdentifier(name); + const id = this._scope.generateUidIdentifier(name); const statement = this._statements[this._statements.length - 1]; - assert(statement.type === "ImportDeclaration"); - assert(statement.specifiers.length === 0); - statement.specifiers = [t.importDefaultSpecifier(name)]; - this._resultName = t.cloneNode(name); + _assert(statement.type === "ImportDeclaration"); + _assert(statement.specifiers.length === 0); + statement.specifiers = [importDefaultSpecifier(id)]; + this._resultName = cloneNode(id); return this; } - named(name, importName) { if (importName === "default") return this.default(name); - name = this._scope.generateUidIdentifier(name); + const id = this._scope.generateUidIdentifier(name); const statement = this._statements[this._statements.length - 1]; - assert(statement.type === "ImportDeclaration"); - assert(statement.specifiers.length === 0); - statement.specifiers = [t.importSpecifier(name, t.identifier(importName))]; - this._resultName = t.cloneNode(name); + _assert(statement.type === "ImportDeclaration"); + _assert(statement.specifiers.length === 0); + statement.specifiers = [importSpecifier(id, identifier(importName))]; + this._resultName = cloneNode(id); return this; } - var(name) { - name = this._scope.generateUidIdentifier(name); + const id = this._scope.generateUidIdentifier(name); let statement = this._statements[this._statements.length - 1]; - if (statement.type !== "ExpressionStatement") { - assert(this._resultName); - statement = t.expressionStatement(this._resultName); - + _assert(this._resultName); + statement = expressionStatement(this._resultName); this._statements.push(statement); } - - this._statements[this._statements.length - 1] = t.variableDeclaration("var", [t.variableDeclarator(name, statement.expression)]); - this._resultName = t.cloneNode(name); + this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(id, statement.expression)]); + this._resultName = cloneNode(id); return this; } - defaultInterop() { return this._interop(this._hub.addHelper("interopRequireDefault")); } - wildcardInterop() { return this._interop(this._hub.addHelper("interopRequireWildcard")); } - _interop(callee) { const statement = this._statements[this._statements.length - 1]; - if (statement.type === "ExpressionStatement") { - statement.expression = t.callExpression(callee, [statement.expression]); + statement.expression = callExpression(callee, [statement.expression]); } else if (statement.type === "VariableDeclaration") { - assert(statement.declarations.length === 1); - statement.declarations[0].init = t.callExpression(callee, [statement.declarations[0].init]); + _assert(statement.declarations.length === 1); + statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]); } else { - assert.fail("Unexpected type."); + _assert.fail("Unexpected type."); } - return this; } - prop(name) { const statement = this._statements[this._statements.length - 1]; - if (statement.type === "ExpressionStatement") { - statement.expression = t.memberExpression(statement.expression, t.identifier(name)); + statement.expression = memberExpression(statement.expression, identifier(name)); } else if (statement.type === "VariableDeclaration") { - assert(statement.declarations.length === 1); - statement.declarations[0].init = t.memberExpression(statement.declarations[0].init, t.identifier(name)); + _assert(statement.declarations.length === 1); + statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name)); } else { - assert.fail("Unexpected type:" + statement.type); + _assert.fail("Unexpected type:" + statement.type); } - return this; } - read(name) { - this._resultName = t.memberExpression(this._resultName, t.identifier(name)); + this._resultName = memberExpression(this._resultName, identifier(name)); } - } +exports.default = ImportBuilder; -exports.default = ImportBuilder; \ No newline at end of file +//# sourceMappingURL=import-builder.js.map diff --git a/node_modules/@babel/helper-module-imports/lib/import-builder.js.map b/node_modules/@babel/helper-module-imports/lib/import-builder.js.map new file mode 100644 index 00000000..aff58bdc --- /dev/null +++ b/node_modules/@babel/helper-module-imports/lib/import-builder.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_assert","require","_t","callExpression","cloneNode","expressionStatement","identifier","importDeclaration","importDefaultSpecifier","importNamespaceSpecifier","importSpecifier","memberExpression","stringLiteral","variableDeclaration","variableDeclarator","ImportBuilder","constructor","importedSource","scope","hub","_statements","_resultName","_importedSource","_scope","_hub","done","statements","resultName","import","push","namespace","name","local","generateUidIdentifier","statement","length","assert","type","specifiers","default","id","named","importName","var","expression","defaultInterop","_interop","addHelper","wildcardInterop","callee","declarations","init","fail","prop","read","exports"],"sources":["../src/import-builder.ts"],"sourcesContent":["import assert from \"assert\";\nimport {\n callExpression,\n cloneNode,\n expressionStatement,\n identifier,\n importDeclaration,\n importDefaultSpecifier,\n importNamespaceSpecifier,\n importSpecifier,\n memberExpression,\n stringLiteral,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Scope } from \"@babel/traverse\";\nimport type { File } from \"@babel/core\";\n\n/**\n * A class to track and accumulate mutations to the AST that will eventually\n * output a new require/import statement list.\n */\nexport default class ImportBuilder {\n private _statements: t.Statement[] = [];\n private _resultName: t.Identifier | t.MemberExpression = null;\n\n declare _scope: Scope;\n declare _hub: File[\"hub\"];\n private _importedSource: string;\n\n constructor(importedSource: string, scope: Scope, hub: File[\"hub\"]) {\n this._scope = scope;\n this._hub = hub;\n this._importedSource = importedSource;\n }\n\n done() {\n return {\n statements: this._statements,\n resultName: this._resultName,\n };\n }\n\n import() {\n this._statements.push(\n importDeclaration([], stringLiteral(this._importedSource)),\n );\n return this;\n }\n\n require() {\n this._statements.push(\n expressionStatement(\n callExpression(identifier(\"require\"), [\n stringLiteral(this._importedSource),\n ]),\n ),\n );\n return this;\n }\n\n namespace(name = \"namespace\") {\n const local = this._scope.generateUidIdentifier(name);\n\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importNamespaceSpecifier(local)];\n this._resultName = cloneNode(local);\n return this;\n }\n default(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importDefaultSpecifier(id)];\n this._resultName = cloneNode(id);\n return this;\n }\n named(name: string, importName: string) {\n if (importName === \"default\") return this.default(name);\n\n const id = this._scope.generateUidIdentifier(name);\n const statement = this._statements[this._statements.length - 1];\n assert(statement.type === \"ImportDeclaration\");\n assert(statement.specifiers.length === 0);\n statement.specifiers = [importSpecifier(id, identifier(importName))];\n this._resultName = cloneNode(id);\n return this;\n }\n\n var(name: string) {\n const id = this._scope.generateUidIdentifier(name);\n let statement = this._statements[this._statements.length - 1];\n if (statement.type !== \"ExpressionStatement\") {\n assert(this._resultName);\n statement = expressionStatement(this._resultName);\n this._statements.push(statement);\n }\n this._statements[this._statements.length - 1] = variableDeclaration(\"var\", [\n variableDeclarator(id, statement.expression),\n ]);\n this._resultName = cloneNode(id);\n return this;\n }\n\n defaultInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireDefault\"));\n }\n wildcardInterop() {\n return this._interop(this._hub.addHelper(\"interopRequireWildcard\"));\n }\n\n _interop(callee: t.Expression) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = callExpression(callee, [statement.expression]);\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = callExpression(callee, [\n statement.declarations[0].init,\n ]);\n } else {\n assert.fail(\"Unexpected type.\");\n }\n return this;\n }\n\n prop(name: string) {\n const statement = this._statements[this._statements.length - 1];\n if (statement.type === \"ExpressionStatement\") {\n statement.expression = memberExpression(\n statement.expression,\n identifier(name),\n );\n } else if (statement.type === \"VariableDeclaration\") {\n assert(statement.declarations.length === 1);\n statement.declarations[0].init = memberExpression(\n statement.declarations[0].init,\n identifier(name),\n );\n } else {\n assert.fail(\"Unexpected type:\" + statement.type);\n }\n return this;\n }\n\n read(name: string) {\n this._resultName = memberExpression(this._resultName, identifier(name));\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAasB;EAZpBE,cAAc;EACdC,SAAS;EACTC,mBAAmB;EACnBC,UAAU;EACVC,iBAA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B,CAAC,IAAI,CAACU,WAAW,EAAEf,UAAU,CAACyB,IAAI,CAAC,CAAC;EACzE;AACF;AAACwB,OAAA,CAAAhB,OAAA,GAAAxB,aAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-imports/lib/import-injector.js b/node_modules/@babel/helper-module-imports/lib/import-injector.js index e22937be..f1b8b7f1 100644 --- a/node_modules/@babel/helper-module-imports/lib/import-injector.js +++ b/node_modules/@babel/helper-module-imports/lib/import-injector.js @@ -4,21 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; - -var t = _interopRequireWildcard(require("@babel/types")); - -var _importBuilder = _interopRequireDefault(require("./import-builder")); - -var _isModule = _interopRequireDefault(require("./is-module")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const assert = require("assert"); - +var _assert = require("assert"); +var _t = require("@babel/types"); +var _importBuilder = require("./import-builder"); +var _isModule = require("./is-module"); +const { + numericLiteral, + sequenceExpression +} = _t; class ImportInjector { constructor(path, importedSource, opts) { this._defaultOpts = { @@ -36,54 +29,35 @@ class ImportInjector { this._hub = programPath.hub; this._defaultOpts = this._applyDefaults(importedSource, opts, true); } - addDefault(importedSourceIn, opts) { return this.addNamed("default", importedSourceIn, opts); } - addNamed(importName, importedSourceIn, opts) { - assert(typeof importName === "string"); + _assert(typeof importName === "string"); return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName); } - addNamespace(importedSourceIn, opts) { return this._generateImport(this._applyDefaults(importedSourceIn, opts), null); } - addSideEffect(importedSourceIn, opts) { - return this._generateImport(this._applyDefaults(importedSourceIn, opts), false); + return this._generateImport(this._applyDefaults(importedSourceIn, opts), void 0); } - _applyDefaults(importedSource, opts, isInit = false) { - const optsList = []; - + let newOpts; if (typeof importedSource === "string") { - optsList.push({ + newOpts = Object.assign({}, this._defaultOpts, { importedSource - }); - optsList.push(opts); + }, opts); } else { - assert(!opts, "Unexpected secondary arguments."); - optsList.push(importedSource); + _assert(!opts, "Unexpected secondary arguments."); + newOpts = Object.assign({}, this._defaultOpts, importedSource); } - - const newOpts = Object.assign({}, this._defaultOpts); - - for (const opts of optsList) { - if (!opts) continue; - Object.keys(newOpts).forEach(key => { - if (opts[key] !== undefined) newOpts[key] = opts[key]; - }); - - if (!isInit) { - if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint; - if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist; - } + if (!isInit && opts) { + if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint; + if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist; } - return newOpts; } - _generateImport(opts, importName) { const isDefault = importName === "default"; const isNamed = !!importName && !isDefault; @@ -103,20 +77,15 @@ class ImportInjector { const isMod = (0, _isModule.default)(this._programPath); const isModuleForNode = isMod && importingInterop === "node"; const isModuleForBabel = isMod && importingInterop === "babel"; - if (importPosition === "after" && !isMod) { throw new Error(`"importPosition": "after" is only supported in modules`); } - const builder = new _importBuilder.default(importedSource, this._programScope, this._hub); - if (importedType === "es6") { if (!isModuleForNode && !isModuleForBabel) { throw new Error("Cannot import an ES6 module from CommonJS"); } - builder.import(); - if (isNamespace) { builder.namespace(nameHint || importedSource); } else if (isDefault || isNamed) { @@ -129,7 +98,6 @@ class ImportInjector { name = name !== "default" ? name : importedSource; const es6Default = `${importedSource}$es6Default`; builder.import(); - if (isNamespace) { builder.default(es6Default).var(name || importedSource).wildcardInterop(); } else if (isDefault) { @@ -143,7 +111,6 @@ class ImportInjector { } } else if (isModuleForBabel) { builder.import(); - if (isNamespace) { builder.namespace(name || importedSource); } else if (isDefault || isNamed) { @@ -151,7 +118,6 @@ class ImportInjector { } } else { builder.require(); - if (isNamespace) { builder.var(name || importedSource).wildcardInterop(); } else if ((isDefault || isNamed) && ensureLiveReference) { @@ -171,7 +137,6 @@ class ImportInjector { } else if (importedInterop === "compiled") { if (isModuleForNode) { builder.import(); - if (isNamespace) { builder.default(name || importedSource); } else if (isDefault || isNamed) { @@ -179,7 +144,6 @@ class ImportInjector { } } else if (isModuleForBabel) { builder.import(); - if (isNamespace) { builder.namespace(name || importedSource); } else if (isDefault || isNamed) { @@ -187,7 +151,6 @@ class ImportInjector { } } else { builder.require(); - if (isNamespace) { builder.var(name || importedSource); } else if (isDefault || isNamed) { @@ -202,10 +165,8 @@ class ImportInjector { if (isDefault && ensureLiveReference) { throw new Error("No live reference for commonjs default"); } - if (isModuleForNode) { builder.import(); - if (isNamespace) { builder.default(name || importedSource); } else if (isDefault) { @@ -215,7 +176,6 @@ class ImportInjector { } } else if (isModuleForBabel) { builder.import(); - if (isNamespace) { builder.default(name || importedSource); } else if (isDefault) { @@ -225,7 +185,6 @@ class ImportInjector { } } else { builder.require(); - if (isNamespace) { builder.var(name || importedSource); } else if (isDefault) { @@ -241,24 +200,18 @@ class ImportInjector { } else { throw new Error(`Unknown importedInterop "${importedInterop}".`); } - const { statements, resultName } = builder.done(); - this._insertStatements(statements, importPosition, blockHoist); - if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") { - return t.sequenceExpression([t.numericLiteral(0), resultName]); + return sequenceExpression([numericLiteral(0), resultName]); } - return resultName; } - _insertStatements(statements, importPosition = "before", blockHoist = 3) { const body = this._programPath.get("body"); - if (importPosition === "after") { for (let i = body.length - 1; i >= 0; i--) { if (body[i].isImportDeclaration()) { @@ -274,16 +227,14 @@ class ImportInjector { const val = p.node._blockHoist; return Number.isFinite(val) && val < 4; }); - if (targetPath) { targetPath.insertBefore(statements); return; } } - this._programPath.unshiftContainer("body", statements); } - } +exports.default = ImportInjector; -exports.default = ImportInjector; \ No newline at end of file +//# sourceMappingURL=import-injector.js.map diff --git a/node_modules/@babel/helper-module-imports/lib/import-injector.js.map b/node_modules/@babel/helper-module-imports/lib/import-injector.js.map new file mode 100644 index 00000000..7071f70d --- /dev/null +++ b/node_modules/@babel/helper-module-imports/lib/import-injector.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_assert","require","_t","_importBuilder","_isModule","numericLiteral","sequenceExpression","ImportInjector","constructor","path","importedSource","opts","_defaultOpts","importedType","importedInterop","importingInterop","ensureLiveReference","ensureNoContext","importPosition","programPath","find","p","isProgram","_programPath","_programScope","scope","_hub","hub","_applyDefaults","addDefault","importedSourceIn","addNamed","importName","assert","_generateImport","addNamespace","addSideEffect","isInit","newOpts","Object","assign","nameHint","undefined","blockHoist","isDefault","isNamed","isNamespace","name","isMod","isModule","isModuleForNode","isModuleForBabel","Error","builder","ImportBuilder","import","namespace","named","es6Default","default","var","wildcardInterop","defaultInterop","read","prop","statements","resultName","done","_insertStatements","type","body","get","i","length","isImportDeclaration","insertAfter","forEach","node","_blockHoist","targetPath","val","Number","isFinite","insertBefore","unshiftContainer","exports"],"sources":["../src/import-injector.ts"],"sourcesContent":["import assert from \"assert\";\nimport { numericLiteral, sequenceExpression } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope } from \"@babel/traverse\";\nimport type { File } from \"@babel/core\";\n\nimport ImportBuilder from \"./import-builder\";\nimport isModule from \"./is-module\";\n\nexport type ImportOptions = {\n /**\n * The module being referenced.\n */\n importedSource: string | null;\n /**\n * The type of module being imported:\n *\n * * 'es6' - An ES6 module.\n * * 'commonjs' - A CommonJS module. (Default)\n */\n importedType: \"es6\" | \"commonjs\";\n /**\n * The type of interop behavior for namespace/default/named when loading\n * CommonJS modules.\n *\n * ## 'babel' (Default)\n *\n * Load using Babel's interop.\n *\n * If '.__esModule' is true, treat as 'compiled', else:\n *\n * * Namespace: A copy of the module.exports with .default\n * populated by the module.exports object.\n * * Default: The module.exports value.\n * * Named: The .named property of module.exports.\n *\n * The 'ensureLiveReference' has no effect on the liveness of these.\n *\n * ## 'compiled'\n *\n * Assume the module is ES6 compiled to CommonJS. Useful to avoid injecting\n * interop logic if you are confident that the module is a certain format.\n *\n * * Namespace: The root module.exports object.\n * * Default: The .default property of the namespace.\n * * Named: The .named property of the namespace.\n *\n * Will return erroneous results if the imported module is _not_ compiled\n * from ES6 with Babel.\n *\n * ## 'uncompiled'\n *\n * Assume the module is _not_ ES6 compiled to CommonJS. Used a simplified\n * access pattern that doesn't require additional function calls.\n *\n * Will return erroneous results if the imported module _is_ compiled\n * from ES6 with Babel.\n *\n * * Namespace: The module.exports object.\n * * Default: The module.exports object.\n * * Named: The .named property of module.exports.\n */\n importedInterop: \"babel\" | \"node\" | \"compiled\" | \"uncompiled\";\n /**\n * The type of CommonJS interop included in the environment that will be\n * loading the output code.\n *\n * * 'babel' - CommonJS modules load with Babel's interop. (Default)\n * * 'node' - CommonJS modules load with Node's interop.\n *\n * See descriptions in 'importedInterop' for more details.\n */\n importingInterop: \"babel\" | \"node\";\n /**\n * Define whether we explicitly care that the import be a live reference.\n * Only applies when importing default and named imports, not the namespace.\n *\n * * true - Force imported values to be live references.\n * * false - No particular requirements. Keeps the code simplest. (Default)\n */\n ensureLiveReference: boolean;\n /**\n * Define if we explicitly care that the result not be a property reference.\n *\n * * true - Force calls to exclude context. Useful if the value is going to\n * be used as function callee.\n * * false - No particular requirements for context of the access. (Default)\n */\n ensureNoContext: boolean;\n /**\n * Define whether the import should be loaded before or after the existing imports.\n * \"after\" is only allowed inside ECMAScript modules, since it's not possible to\n * reliably pick the location _after_ require() calls but _before_ other code in CJS.\n */\n importPosition: \"before\" | \"after\";\n\n nameHint?: string;\n blockHoist?: number;\n};\n\n/**\n * A general helper classes add imports via transforms. See README for usage.\n */\nexport default class ImportInjector {\n /**\n * The path used for manipulation.\n */\n declare _programPath: NodePath;\n\n /**\n * The scope used to generate unique variable names.\n */\n declare _programScope: Scope;\n\n /**\n * The file used to inject helpers and resolve paths.\n */\n declare _hub: File[\"hub\"];\n\n /**\n * The default options to use with this instance when imports are added.\n */\n _defaultOpts: ImportOptions = {\n importedSource: null,\n importedType: \"commonjs\",\n importedInterop: \"babel\",\n importingInterop: \"babel\",\n ensureLiveReference: false,\n ensureNoContext: false,\n importPosition: \"before\",\n };\n\n constructor(\n path: NodePath,\n importedSource?: string,\n opts?: Partial,\n ) {\n const programPath = path.find(p => p.isProgram()) as NodePath;\n\n this._programPath = programPath;\n this._programScope = programPath.scope;\n this._hub = programPath.hub as File[\"hub\"];\n\n this._defaultOpts = this._applyDefaults(importedSource, opts, true);\n }\n\n addDefault(importedSourceIn: string, opts: Partial) {\n return this.addNamed(\"default\", importedSourceIn, opts);\n }\n\n addNamed(\n importName: string,\n importedSourceIn: string,\n opts: Partial,\n ) {\n assert(typeof importName === \"string\");\n\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n importName,\n );\n }\n\n addNamespace(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n null,\n );\n }\n\n addSideEffect(importedSourceIn: string, opts: Partial) {\n return this._generateImport(\n this._applyDefaults(importedSourceIn, opts),\n void 0,\n );\n }\n\n _applyDefaults(\n importedSource: string | Partial,\n opts: Partial | undefined,\n isInit = false,\n ) {\n let newOpts: ImportOptions;\n if (typeof importedSource === \"string\") {\n newOpts = { ...this._defaultOpts, importedSource, ...opts };\n } else {\n assert(!opts, \"Unexpected secondary arguments.\");\n newOpts = { ...this._defaultOpts, ...importedSource };\n }\n\n if (!isInit && opts) {\n if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;\n if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;\n }\n return newOpts;\n }\n\n _generateImport(\n opts: Partial,\n importName: string | null | undefined,\n ) {\n const isDefault = importName === \"default\";\n const isNamed = !!importName && !isDefault;\n const isNamespace = importName === null;\n\n const {\n importedSource,\n importedType,\n importedInterop,\n importingInterop,\n ensureLiveReference,\n ensureNoContext,\n nameHint,\n importPosition,\n\n // Not meant for public usage. Allows code that absolutely must control\n // ordering to set a specific hoist value on the import nodes.\n // This is ignored when \"importPosition\" is \"after\".\n blockHoist,\n } = opts;\n\n // Provide a hint for generateUidIdentifier for the local variable name\n // to use for the import, if the code will generate a simple assignment\n // to a variable.\n let name = nameHint || importName;\n\n const isMod = isModule(this._programPath);\n const isModuleForNode = isMod && importingInterop === \"node\";\n const isModuleForBabel = isMod && importingInterop === \"babel\";\n\n if (importPosition === \"after\" && !isMod) {\n throw new Error(`\"importPosition\": \"after\" is only supported in modules`);\n }\n\n const builder = new ImportBuilder(\n importedSource,\n this._programScope,\n this._hub,\n );\n\n if (importedType === \"es6\") {\n if (!isModuleForNode && !isModuleForBabel) {\n throw new Error(\"Cannot import an ES6 module from CommonJS\");\n }\n\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(nameHint || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else if (importedType !== \"commonjs\") {\n throw new Error(`Unexpected interopType \"${importedType}\"`);\n } else if (importedInterop === \"babel\") {\n if (isModuleForNode) {\n // import _tmp from ''; var namespace = interopRequireWildcard(_tmp); namespace\n // import _tmp from ''; var def = interopRequireDefault(_tmp).default; def\n // import _tmp from ''; _tmp.named\n name = name !== \"default\" ? name : importedSource;\n const es6Default = `${importedSource}$es6Default`;\n\n builder.import();\n if (isNamespace) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .wildcardInterop();\n } else if (isDefault) {\n if (ensureLiveReference) {\n builder\n .default(es6Default)\n .var(name || importedSource)\n .defaultInterop()\n .read(\"default\");\n } else {\n builder\n .default(es6Default)\n .var(name)\n .defaultInterop()\n .prop(importName);\n }\n } else if (isNamed) {\n builder.default(es6Default).read(importName);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = interopRequireWildcard(require(''));\n // var def = interopRequireDefault(require('')).default; def\n // var named = require('').named; named\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource).wildcardInterop();\n } else if ((isDefault || isNamed) && ensureLiveReference) {\n if (isDefault) {\n name = name !== \"default\" ? name : importedSource;\n builder.var(name).read(importName);\n builder.defaultInterop();\n } else {\n builder.var(importedSource).read(importName);\n }\n } else if (isDefault) {\n builder.var(name).defaultInterop().prop(importName);\n } else if (isNamed) {\n builder.var(name).prop(importName);\n }\n }\n } else if (importedInterop === \"compiled\") {\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import namespace from ''; namespace.default\n // import namespace from ''; namespace.named\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import * as namespace from ''; namespace\n // import def from ''; def\n // import { named } from ''; named\n // Note: These lookups will break if the module has no __esModule set,\n // hence the warning that 'compiled' will not work on standard CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.namespace(name || importedSource);\n } else if (isDefault || isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var namespace = require(''); namespace.default\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault || isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.prop(importName).var(name);\n }\n }\n }\n } else if (importedInterop === \"uncompiled\") {\n if (isDefault && ensureLiveReference) {\n throw new Error(\"No live reference for commonjs default\");\n }\n\n if (isModuleForNode) {\n // import namespace from ''; namespace\n // import def from ''; def;\n // import namespace from ''; namespace.named\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.default(importedSource).read(name);\n }\n } else if (isModuleForBabel) {\n // import namespace from '';\n // import def from '';\n // import { named } from ''; named;\n // Note: These lookups will break if the module has __esModule set,\n // hence the warning that 'uncompiled' will not work on ES6 transpiled\n // to CommonJS.\n\n builder.import();\n if (isNamespace) {\n builder.default(name || importedSource);\n } else if (isDefault) {\n builder.default(name);\n } else if (isNamed) {\n builder.named(name, importName);\n }\n } else {\n // var namespace = require(''); namespace\n // var def = require(''); def\n // var namespace = require(''); namespace.named\n // var named = require('').named;\n builder.require();\n if (isNamespace) {\n builder.var(name || importedSource);\n } else if (isDefault) {\n builder.var(name);\n } else if (isNamed) {\n if (ensureLiveReference) {\n builder.var(importedSource).read(name);\n } else {\n builder.var(name).prop(importName);\n }\n }\n }\n } else {\n throw new Error(`Unknown importedInterop \"${importedInterop}\".`);\n }\n\n const { statements, resultName } = builder.done();\n\n this._insertStatements(statements, importPosition, blockHoist);\n\n if (\n (isDefault || isNamed) &&\n ensureNoContext &&\n resultName.type !== \"Identifier\"\n ) {\n return sequenceExpression([numericLiteral(0), resultName]);\n }\n return resultName;\n }\n\n _insertStatements(\n statements: t.Statement[],\n importPosition = \"before\",\n blockHoist = 3,\n ) {\n const body = this._programPath.get(\"body\");\n\n if (importPosition === \"after\") {\n for (let i = body.length - 1; i >= 0; i--) {\n if (body[i].isImportDeclaration()) {\n body[i].insertAfter(statements);\n return;\n }\n }\n } else {\n statements.forEach(node => {\n // @ts-expect-error handle _blockHoist\n node._blockHoist = blockHoist;\n });\n\n const targetPath = body.find(p => {\n // @ts-expect-error todo(flow->ts): avoid mutations\n const val = p.node._blockHoist;\n return Number.isFinite(val) && val < 4;\n });\n\n if (targetPath) {\n targetPath.insertBefore(statements);\n return;\n }\n }\n\n this._programPath.unshiftContainer(\"body\", statements);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAKA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAAmC;EAN1BI,cAAc;EAAEC;AAAkB,IAAAJ,EAAA;AAsG5B,MAAMK,cAAc,CAAC;EA6BlCC,WAAWA,CACTC,IAAc,EACdC,cAAuB,EACvBC,IAA6B,EAC7B;IAAA,KAdFC,YAAY,GAAkB;MAC5BF,cAAc,EAAE,IAAI;MACpBG,YAAY,EAAE,UAAU;MACxBC,eAAe,EAAE,OAAO;MACxBC,gBAAgB,EAAE,OAAO;MACzBC,mBAAmB,EAAE,KAAK;MAC1BC,eAAe,EAAE,KAAK;MACtBC,cAAc,EAAE;IAClB,CAAC;IAOC,MAAMC,WAAW,GAAGV,IAAI,CAACW,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,SAAS,EAAE,CAAwB;IAExE,IAAI,CAACC,YAAY,GAAGJ,WAAW;IAC/B,IAAI,CAACK,aAAa,GAAGL,WAAW,CAACM,KAAK;IACtC,IAAI,CAACC,IAAI,GAAGP,WAAW,CAACQ,GAAkB;IAE1C,IAAI,CAACf,YAAY,GAAG,IAAI,CAACgB,cAAc,CAAClB,cAAc,EAAEC,IAAI,EAAE,IAAI,CAAC;EACrE;EAEAkB,UAAUA,CAACC,gBAAwB,EAAEnB,IAA4B,EAAE;IACjE,OAAO,IAAI,CAACoB,QAAQ,CAAC,SAAS,EAAED,gBAAgB,EAAEnB,IAAI,CAAC;EACzD;EAEAoB,QAAQA,CACNC,UAAkB,EAClBF,gBAAwB,EACxBnB,IAA4B,EAC5B;IACAsB,OAAM,CAAC,OAAOD,UAAU,KAAK,QAAQ,CAAC;IAEtC,OAAO,IAAI,CA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AE;QACzC,IAAIF,IAAI,CAACE,CAAC,CAAC,CAACE,mBAAmB,EAAE,EAAE;UACjCJ,IAAI,CAACE,CAAC,CAAC,CAACG,WAAW,CAACV,UAAU,CAAC;UAC/B;QACF;MACF;IACF,CAAC,MAAM;MACLA,UAAU,CAACW,OAAO,CAACC,IAAI,IAAI;QAEzBA,IAAI,CAACC,WAAW,GAAGnC,UAAU;MAC/B,CAAC,CAAC;MAEF,MAAMoC,UAAU,GAAGT,IAAI,CAAClD,IAAI,CAACC,CAAC,IAAI;QAEhC,MAAM2D,GAAG,GAAG3D,CAAC,CAACwD,IAAI,CAACC,WAAW;QAC9B,OAAOG,MAAM,CAACC,QAAQ,CAACF,GAAG,CAAC,IAAIA,GAAG,GAAG,CAAC;MACxC,CAAC,CAAC;MAEF,IAAID,UAAU,EAAE;QACdA,UAAU,CAACI,YAAY,CAAClB,UAAU,CAAC;QACnC;MACF;IACF;IAEA,IAAI,CAAC1C,YAAY,CAAC6D,gBAAgB,CAAC,MAAM,EAAEnB,UAAU,CAAC;EACxD;AACF;AAACoB,OAAA,CAAA1B,OAAA,GAAApD,cAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-imports/lib/index.js b/node_modules/@babel/helper-module-imports/lib/index.js index 50e1e980..99d963a3 100644 --- a/node_modules/@babel/helper-module-imports/lib/index.js +++ b/node_modules/@babel/helper-module-imports/lib/index.js @@ -3,41 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.addDefault = addDefault; -exports.addNamed = addNamed; -exports.addNamespace = addNamespace; -exports.addSideEffect = addSideEffect; Object.defineProperty(exports, "ImportInjector", { enumerable: true, get: function () { return _importInjector.default; } }); +exports.addDefault = addDefault; +exports.addNamed = addNamed; +exports.addNamespace = addNamespace; +exports.addSideEffect = addSideEffect; Object.defineProperty(exports, "isModule", { enumerable: true, get: function () { return _isModule.default; } }); - -var _importInjector = _interopRequireDefault(require("./import-injector")); - -var _isModule = _interopRequireDefault(require("./is-module")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _importInjector = require("./import-injector"); +var _isModule = require("./is-module"); function addDefault(path, importedSource, opts) { return new _importInjector.default(path).addDefault(importedSource, opts); } - function addNamed(path, name, importedSource, opts) { return new _importInjector.default(path).addNamed(name, importedSource, opts); } - function addNamespace(path, importedSource, opts) { return new _importInjector.default(path).addNamespace(importedSource, opts); } - function addSideEffect(path, importedSource, opts) { return new _importInjector.default(path).addSideEffect(importedSource, opts); -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-module-imports/lib/index.js.map b/node_modules/@babel/helper-module-imports/lib/index.js.map new file mode 100644 index 00000000..d132f336 --- /dev/null +++ b/node_modules/@babel/helper-module-imports/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_importInjector","require","_isModule","addDefault","path","importedSource","opts","ImportInjector","addNamed","name","addNamespace","addSideEffect"],"sources":["../src/index.ts"],"sourcesContent":["import ImportInjector, { type ImportOptions } from \"./import-injector\";\nimport type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nexport { ImportInjector };\n\nexport { default as isModule } from \"./is-module\";\n\nexport function addDefault(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addDefault(importedSource, opts);\n}\n\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit<\n Partial,\n \"ensureLiveReference\" | \"ensureNoContext\"\n >,\n): t.Identifier;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureLiveReference\"> & {\n ensureLiveReference: true;\n },\n): t.MemberExpression;\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Omit, \"ensureNoContext\"> & {\n ensureNoContext: true;\n },\n): t.SequenceExpression;\n/**\n * add a named import to the program path of given path\n *\n * @export\n * @param {NodePath} path The starting path to find a program path\n * @param {string} name The name of the generated binding. Babel will prefix it with `_`\n * @param {string} importedSource The source of the import\n * @param {Partial} [opts]\n * @returns {t.Identifier | t.MemberExpression | t.SequenceExpression} If opts.ensureNoContext is true, returns a SequenceExpression,\n * else if opts.ensureLiveReference is true, returns a MemberExpression, else returns an Identifier\n */\nfunction addNamed(\n path: NodePath,\n name: string,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamed(name, importedSource, opts);\n}\nexport { addNamed };\n\nexport function addNamespace(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addNamespace(importedSource, opts);\n}\n\nexport function addSideEffect(\n path: NodePath,\n importedSource: string,\n opts?: Partial,\n) {\n return new ImportInjector(path).addSideEffect(importedSource, opts);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAMA,IAAAC,SAAA,GAAAD,OAAA;AAEO,SAASE,UAAUA,CACxBC,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACD,UAAU,CAACE,cAAc,EAAEC,IAAI,CAAC;AAClE;AAsCA,SAASE,QAAQA,CACfJ,IAAc,EACdK,IAAY,EACZJ,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACI,QAAQ,CAACC,IAAI,EAAEJ,cAAc,EAAEC,IAAI,CAAC;AACtE;AAGO,SAASI,YAAYA,CAC1BN,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACM,YAAY,CAACL,cAAc,EAAEC,IAAI,CAAC;AACpE;AAEO,SAASK,aAAaA,CAC3BP,IAAc,EACdC,cAAsB,EACtBC,IAA6B,EAC7B;EACA,OAAO,IAAIC,uBAAc,CAACH,IAAI,CAAC,CAACO,aAAa,CAACN,cAAc,EAAEC,IAAI,CAAC;AACrE"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-imports/lib/is-module.js b/node_modules/@babel/helper-module-imports/lib/is-module.js index ad9e3995..0bbda013 100644 --- a/node_modules/@babel/helper-module-imports/lib/is-module.js +++ b/node_modules/@babel/helper-module-imports/lib/is-module.js @@ -4,15 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isModule; - function isModule(path) { - const { - sourceType - } = path.node; - - if (sourceType !== "module" && sourceType !== "script") { - throw path.buildCodeFrameError(`Unknown sourceType "${sourceType}", cannot transform.`); - } - return path.node.sourceType === "module"; -} \ No newline at end of file +} + +//# sourceMappingURL=is-module.js.map diff --git a/node_modules/@babel/helper-module-imports/lib/is-module.js.map b/node_modules/@babel/helper-module-imports/lib/is-module.js.map new file mode 100644 index 00000000..a2bcc4eb --- /dev/null +++ b/node_modules/@babel/helper-module-imports/lib/is-module.js.map @@ -0,0 +1 @@ +{"version":3,"names":["isModule","path","node","sourceType"],"sources":["../src/is-module.ts"],"sourcesContent":["import type { NodePath } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\n/**\n * A small utility to check if a file qualifies as a module.\n */\nexport default function isModule(path: NodePath) {\n return path.node.sourceType === \"module\";\n}\n"],"mappings":";;;;;;AAMe,SAASA,QAAQA,CAACC,IAAyB,EAAE;EAC1D,OAAOA,IAAI,CAACC,IAAI,CAACC,UAAU,KAAK,QAAQ;AAC1C"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-imports/package.json b/node_modules/@babel/helper-module-imports/package.json index 0b9efad2..22de5e11 100644 --- a/node_modules/@babel/helper-module-imports/package.json +++ b/node_modules/@babel/helper-module-imports/package.json @@ -1,56 +1,28 @@ { - "_from": "@babel/helper-module-imports@^7.13.12", - "_id": "@babel/helper-module-imports@7.13.12", - "_inBundle": false, - "_integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", - "_location": "/@babel/helper-module-imports", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-module-imports@^7.13.12", - "name": "@babel/helper-module-imports", - "escapedName": "@babel%2fhelper-module-imports", - "scope": "@babel", - "rawSpec": "^7.13.12", - "saveSpec": null, - "fetchSpec": "^7.13.12" - }, - "_requiredBy": [ - "/@babel/helper-module-transforms" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "_shasum": "c6a369a6f3621cb25da014078684da9196b61977", - "_spec": "@babel/helper-module-imports@^7.13.12", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/helper-module-transforms", - "author": { - "name": "Logan Smyth", - "email": "loganfsmyth@gmail.com" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.13.12" - }, - "deprecated": false, + "name": "@babel/helper-module-imports", + "version": "7.21.4", "description": "Babel helper functions for inserting module loads", - "devDependencies": { - "@babel/core": "7.13.10", - "@babel/traverse": "7.13.0" - }, + "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-helper-module-imports", "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-module-imports", "publishConfig": { "access": "public" }, "repository": { "type": "git", - "url": "git+https://github.com/babel/babel.git", + "url": "https://github.com/babel/babel.git", "directory": "packages/babel-helper-module-imports" }, - "version": "7.13.12" -} + "main": "./lib/index.js", + "dependencies": { + "@babel/types": "^7.21.4" + }, + "devDependencies": { + "@babel/core": "^7.21.4", + "@babel/traverse": "^7.21.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/README.md b/node_modules/@babel/helper-module-transforms/README.md index 243ce295..c7b1a38a 100644 --- a/node_modules/@babel/helper-module-transforms/README.md +++ b/node_modules/@babel/helper-module-transforms/README.md @@ -9,11 +9,11 @@ See our website [@babel/helper-module-transforms](https://babeljs.io/docs/en/bab Using npm: ```sh -npm install --save-dev @babel/helper-module-transforms +npm install --save @babel/helper-module-transforms ``` or using yarn: ```sh -yarn add @babel/helper-module-transforms --dev +yarn add @babel/helper-module-transforms ``` diff --git a/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js b/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js new file mode 100644 index 00000000..d50a2246 --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js @@ -0,0 +1,53 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.buildDynamicImport = buildDynamicImport; +var t = require("@babel/types"); +var _template = require("@babel/template"); +{ + { + { + exports.getDynamicImportSource = function getDynamicImportSource(node) { + const [source] = node.arguments; + return t.isStringLiteral(source) || t.isTemplateLiteral(source) ? source : _template.default.expression.ast`\`\${${source}}\``; + }; + } + } +} +function buildDynamicImport(node, deferToThen, wrapWithPromise, builder) { + const [specifier] = node.arguments; + if (t.isStringLiteral(specifier) || t.isTemplateLiteral(specifier) && specifier.quasis.length === 0) { + if (deferToThen) { + return _template.default.expression.ast` + Promise.resolve().then(() => ${builder(specifier)}) + `; + } else return builder(specifier); + } + const specifierToString = t.isTemplateLiteral(specifier) ? t.identifier("specifier") : t.templateLiteral([t.templateElement({ + raw: "" + }), t.templateElement({ + raw: "" + })], [t.identifier("specifier")]); + if (deferToThen) { + return _template.default.expression.ast` + (specifier => + new Promise(r => r(${specifierToString})) + .then(s => ${builder(t.identifier("s"))}) + )(${specifier}) + `; + } else if (wrapWithPromise) { + return _template.default.expression.ast` + (specifier => + new Promise(r => r(${builder(specifierToString)})) + )(${specifier}) + `; + } else { + return _template.default.expression.ast` + (specifier => ${builder(specifierToString)})(${specifier}) + `; + } +} + +//# sourceMappingURL=dynamic-import.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map b/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map new file mode 100644 index 00000000..6d92ec65 --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map @@ -0,0 +1 @@ +{"version":3,"names":["t","require","_template","exports","getDynamicImportSource","node","source","arguments","isStringLiteral","isTemplateLiteral","template","expression","ast","buildDynamicImport","deferToThen","wrapWithPromise","builder","specifier","quasis","length","specifierToString","identifier","templateLiteral","templateElement","raw"],"sources":["../src/dynamic-import.ts"],"sourcesContent":["// Heavily inspired by\n// https://github.com/airbnb/babel-plugin-dynamic-import-node/blob/master/src/utils.js\n\nimport * as t from \"@babel/types\";\nimport template from \"@babel/template\";\n\nif (!process.env.BABEL_8_BREAKING) {\n if (!USE_ESM) {\n if (!IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource = function getDynamicImportSource(\n node: t.CallExpression,\n ): t.StringLiteral | t.TemplateLiteral {\n const [source] = node.arguments;\n\n return t.isStringLiteral(source) || t.isTemplateLiteral(source)\n ? source\n : (template.expression.ast`\\`\\${${source}}\\`` as t.TemplateLiteral);\n };\n }\n }\n}\n\nexport function buildDynamicImport(\n node: t.CallExpression,\n deferToThen: boolean,\n wrapWithPromise: boolean,\n builder: (specifier: t.Expression) => t.Expression,\n): t.Expression {\n const [specifier] = node.arguments;\n\n if (\n t.isStringLiteral(specifier) ||\n (t.isTemplateLiteral(specifier) && specifier.quasis.length === 0)\n ) {\n if (deferToThen) {\n return template.expression.ast`\n Promise.resolve().then(() => ${builder(specifier)})\n `;\n } else return builder(specifier);\n }\n\n const specifierToString = t.isTemplateLiteral(specifier)\n ? t.identifier(\"specifier\")\n : t.templateLiteral(\n [t.templateElement({ raw: \"\" }), t.templateElement({ raw: \"\" })],\n [t.identifier(\"specifier\")],\n );\n\n if (deferToThen) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${specifierToString}))\n .then(s => ${builder(t.identifier(\"s\"))})\n )(${specifier})\n `;\n } else if (wrapWithPromise) {\n return template.expression.ast`\n (specifier =>\n new Promise(r => r(${builder(specifierToString)}))\n )(${specifier})\n `;\n } else {\n return template.expression.ast`\n (specifier => ${builder(specifierToString)})(${specifier})\n `;\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,CAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEmC;EACnB;IACQ;MAElBE,OAAO,CAACC,sBAAsB,GAAG,SAASA,sBAAsBA,CAC9DC,IAAsB,EACe;QACrC,MAAM,CAACC,MAAM,CAAC,GAAGD,IAAI,CAACE,SAAS;QAE/B,OAAOP,CAAC,CAACQ,eAAe,CAACF,MAAM,CAAC,IAAIN,CAAC,CAACS,iBAAiB,CAACH,MAAM,CAAC,GAC3DA,MAAM,GACLI,iBAAQ,CAACC,UAAU,CAACC,GAAI,QAAON,MAAO,KAA0B;MACvE,CAAC;IACH;EACF;AACF;AAEO,SAASO,kBAAkBA,CAChCR,IAAsB,EACtBS,WAAoB,EACpBC,eAAwB,EACxBC,OAAkD,EACpC;EACd,MAAM,CAACC,SAAS,CAAC,GAAGZ,IAAI,CAACE,SAAS;EAElC,IACEP,CAAC,CAACQ,eAAe,CAACS,SAAS,CAAC,IAC3BjB,CAAC,CAACS,iBAAiB,CAACQ,SAAS,CAAC,IAAIA,SAAS,CAACC,MAAM,CAACC,MAAM,KAAK,CAAE,EACjE;IACA,IAAIL,WAAW,EAAE;MACf,OAAOJ,iBAAQ,CAACC,UAAU,CAACC,GAAI;AACrC,uCAAuCI,OAAO,CAACC,SAAS,CAAE;AAC1D,OAAO;IACH,CAAC,MAAM,OAAOD,OAAO,CAACC,SAAS,CAAC;EAClC;EAEA,MAAMG,iBAAiB,GAAGpB,CAAC,CAACS,iBAAiB,CAACQ,SAAS,CAAC,GACpDjB,CAAC,CAACqB,UAAU,CAAC,WAAW,CAAC,GACzBrB,CAAC,CAACsB,eAAe,CACf,CAACtB,CAAC,CAACuB,eAAe,CAAC;IAAEC,GAAG,EAAE;EAAG,CAAC,CAAC,EAAExB,CAAC,CAACuB,eAAe,CAAC;IAAEC,GAAG,EAAE;EAAG,CAAC,CAAC,CAAC,EAChE,CAACxB,CAAC,CAACqB,UAAU,CAAC,WAAW,CAAC,CAC5B,CAAC;EAEL,IAAIP,WAAW,EAAE;IACf,OAAOJ,iBAAQ,CAACC,UAAU,CAACC,GAAI;AACnC;AACA,6BAA6BQ,iBAAkB;AAC/C,uBAAuBJ,OAAO,CAAChB,CAAC,CAACqB,UAAU,CAAC,GAAG,CAAC,CAAE;AAClD,UAAUJ,SAAU;AACpB,KAAK;EACH,CAAC,MAAM,IAAIF,eAAe,EAAE;IAC1B,OAAOL,iBAAQ,CAACC,UAAU,CAACC,GAAI;AACnC;AACA,6BAA6BI,OAAO,CAACI,iBAAiB,CAAE;AACxD,UAAUH,SAAU;AACpB,KAAK;EACH,CAAC,MAAM;IACL,OAAOP,iBAAQ,CAACC,UAAU,CAACC,GAAI;AACnC,sBAAsBI,OAAO,CAACI,iBAAiB,CAAE,KAAIH,SAAU;AAC/D,KAAK;EACH;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js index 87c2b835..ee130792 100644 --- a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js +++ b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js @@ -6,10 +6,8 @@ Object.defineProperty(exports, "__esModule", { exports.default = getModuleName; { const originalGetModuleName = getModuleName; - exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) { var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo; - return originalGetModuleName(rootOpts, { moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId, moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds, @@ -18,7 +16,6 @@ exports.default = getModuleName; }); }; } - function getModuleName(rootOpts, pluginOpts) { const { filename, @@ -32,23 +29,20 @@ function getModuleName(rootOpts, pluginOpts) { moduleRoot = sourceRoot } = pluginOpts; if (!moduleIds) return null; - if (moduleId != null && !getModuleId) { return moduleId; } - let moduleName = moduleRoot != null ? moduleRoot + "/" : ""; - if (filenameRelative) { const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); } - moduleName = moduleName.replace(/\\/g, "/"); - if (getModuleId) { return getModuleId(moduleName) || moduleName; } else { return moduleName; } -} \ No newline at end of file +} + +//# sourceMappingURL=get-module-name.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map new file mode 100644 index 00000000..545393c7 --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js.map @@ -0,0 +1 @@ +{"version":3,"names":["originalGetModuleName","getModuleName","exports","default","rootOpts","pluginOpts","_pluginOpts$moduleId","_pluginOpts$moduleIds","_pluginOpts$getModule","_pluginOpts$moduleRoo","moduleId","moduleIds","getModuleId","moduleRoot","filename","filenameRelative","sourceRoot","moduleName","sourceRootReplacer","RegExp","replace"],"sources":["../src/get-module-name.ts"],"sourcesContent":["type RootOptions = {\n filename?: string;\n filenameRelative?: string;\n sourceRoot?: string;\n};\n\nexport type PluginOptions = {\n moduleId?: string;\n moduleIds?: boolean;\n getModuleId?: (moduleName: string) => string | null | undefined;\n moduleRoot?: string;\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n const originalGetModuleName = getModuleName;\n\n // @ts-expect-error TS doesn't like reassigning a function.\n // eslint-disable-next-line no-func-assign\n getModuleName = function getModuleName(\n rootOpts: RootOptions & PluginOptions,\n pluginOpts: PluginOptions,\n ): string | null {\n return originalGetModuleName(rootOpts, {\n moduleId: pluginOpts.moduleId ?? rootOpts.moduleId,\n moduleIds: pluginOpts.moduleIds ?? rootOpts.moduleIds,\n getModuleId: pluginOpts.getModuleId ?? rootOpts.getModuleId,\n moduleRoot: pluginOpts.moduleRoot ?? rootOpts.moduleRoot,\n });\n };\n}\n\nexport default function getModuleName(\n rootOpts: RootOptions,\n pluginOpts: PluginOptions,\n): string | null {\n const {\n filename,\n filenameRelative = filename,\n sourceRoot = pluginOpts.moduleRoot,\n } = rootOpts;\n\n const {\n moduleId,\n moduleIds = !!moduleId,\n\n getModuleId,\n\n moduleRoot = sourceRoot,\n } = pluginOpts;\n\n if (!moduleIds) return null;\n\n // moduleId is n/a if a `getModuleId()` is provided\n if (moduleId != null && !getModuleId) {\n return moduleId;\n }\n\n let moduleName = moduleRoot != null ? moduleRoot + \"/\" : \"\";\n\n if (filenameRelative) {\n const sourceRootReplacer =\n sourceRoot != null ? new RegExp(\"^\" + sourceRoot + \"/?\") : \"\";\n\n moduleName += filenameRelative\n // remove sourceRoot from filename\n .replace(sourceRootReplacer, \"\")\n // remove extension\n .replace(/\\.(\\w*?)$/, \"\");\n }\n\n // normalize path separators\n moduleName = moduleName.replace(/\\\\/g, \"/\");\n\n if (getModuleId) {\n // If return is falsy, assume they want us to use our generated default name\n return getModuleId(moduleName) || moduleName;\n } else {\n return moduleName;\n }\n}\n"],"mappings":";;;;;;AAamC;EACjC,MAAMA,qBAAqB,GAAGC,aAAa;EAI3CC,OAAA,CAAAC,OAAA,GAAAF,aAAa,GAAG,SAASA,aAAaA,CACpCG,QAAqC,EACrCC,UAAyB,EACV;IAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,qBAAA,EAAAC,qBAAA;IACf,OAAOT,qBAAqB,CAACI,QAAQ,EAAE;MACrCM,QAAQ,GAAAJ,oBAAA,GAAED,UAAU,CAACK,QAAQ,YAAAJ,oBAAA,GAAIF,QAAQ,CAACM,QAAQ;MAClDC,SAAS,GAAAJ,qBAAA,GAAEF,UAAU,CAACM,SAAS,YAAAJ,qBAAA,GAAIH,QAAQ,CAACO,SAAS;MACrDC,WAAW,GAAAJ,qBAAA,GAAEH,UAAU,CAACO,WAAW,YAAAJ,qBAAA,GAAIJ,QAAQ,CAACQ,WAAW;MAC3DC,UAAU,GAAAJ,qBAAA,GAAEJ,UAAU,CAACQ,UAAU,YAAAJ,qBAAA,GAAIL,QAAQ,CAACS;IAChD,CAAC,CAAC;EACJ,CAAC;AACH;AAEe,SAASZ,aAAaA,CACnCG,QAAqB,EACrBC,UAAyB,EACV;EACf,MAAM;IACJS,QAAQ;IACRC,gBAAgB,GAAGD,QAAQ;IAC3BE,UAAU,GAAGX,UAAU,CAACQ;EAC1B,CAAC,GAAGT,QAAQ;EAEZ,MAAM;IACJM,QAAQ;IACRC,SAAS,GAAG,CAAC,CAACD,QAAQ;IAEtBE,WAAW;IAEXC,UAAU,GAAGG;EACf,CAAC,GAAGX,UAAU;EAEd,IAAI,CAACM,SAAS,EAAE,OAAO,IAAI;EAG3B,IAAID,QAAQ,IAAI,IAAI,IAAI,CAACE,WAAW,EAAE;IACpC,OAAOF,QAAQ;EACjB;EAEA,IAAIO,UAAU,GAAGJ,UAAU,IAAI,IAAI,GAAGA,UAAU,GAAG,GAAG,GAAG,EAAE;EAE3D,IAAIE,gBAAgB,EAAE;IACpB,MAAMG,kBAAkB,GACtBF,UAAU,IAAI,IAAI,GAAG,IAAIG,MAAM,CAAC,GAAG,GAAGH,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE;IAE/DC,UAAU,IAAIF,gBAAgB,CAE3BK,OAAO,CAACF,kBAAkB,EAAE,EAAE,CAAC,CAE/BE,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;EAC7B;EAGAH,UAAU,GAAGA,UAAU,CAACG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAE3C,IAAIR,WAAW,EAAE;IAEf,OAAOA,WAAW,CAACK,UAAU,CAAC,IAAIA,UAAU;EAC9C,CAAC,MAAM;IACL,OAAOA,UAAU;EACnB;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/lib/index.js b/node_modules/@babel/helper-module-transforms/lib/index.js index 8109aed0..a7980caa 100644 --- a/node_modules/@babel/helper-module-transforms/lib/index.js +++ b/node_modules/@babel/helper-module-transforms/lib/index.js @@ -3,20 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); -exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader; -exports.ensureStatementsHoisted = ensureStatementsHoisted; -exports.wrapInterop = wrapInterop; -exports.buildNamespaceInitStatements = buildNamespaceInitStatements; -Object.defineProperty(exports, "isModule", { +Object.defineProperty(exports, "buildDynamicImport", { enumerable: true, get: function () { - return _helperModuleImports.isModule; + return _dynamicImport.buildDynamicImport; } }); -Object.defineProperty(exports, "rewriteThis", { +exports.buildNamespaceInitStatements = buildNamespaceInitStatements; +exports.ensureStatementsHoisted = ensureStatementsHoisted; +Object.defineProperty(exports, "getModuleName", { enumerable: true, get: function () { - return _rewriteThis.default; + return _getModuleName.default; } }); Object.defineProperty(exports, "hasExports", { @@ -25,111 +23,123 @@ Object.defineProperty(exports, "hasExports", { return _normalizeAndLoadMetadata.hasExports; } }); +Object.defineProperty(exports, "isModule", { + enumerable: true, + get: function () { + return _helperModuleImports.isModule; + } +}); Object.defineProperty(exports, "isSideEffectImport", { enumerable: true, get: function () { return _normalizeAndLoadMetadata.isSideEffectImport; } }); -Object.defineProperty(exports, "getModuleName", { +exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader; +Object.defineProperty(exports, "rewriteThis", { enumerable: true, get: function () { - return _getModuleName.default; + return _rewriteThis.default; } }); - -var t = _interopRequireWildcard(require("@babel/types")); - -var _template = _interopRequireDefault(require("@babel/template")); - +exports.wrapInterop = wrapInterop; +var _assert = require("assert"); +var _t = require("@babel/types"); +var _template = require("@babel/template"); var _helperModuleImports = require("@babel/helper-module-imports"); - -var _rewriteThis = _interopRequireDefault(require("./rewrite-this")); - -var _rewriteLiveReferences = _interopRequireDefault(require("./rewrite-live-references")); - -var _normalizeAndLoadMetadata = _interopRequireWildcard(require("./normalize-and-load-metadata")); - -var _getModuleName = _interopRequireDefault(require("./get-module-name")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const assert = require("assert"); - +var _rewriteThis = require("./rewrite-this"); +var _rewriteLiveReferences = require("./rewrite-live-references"); +var _normalizeAndLoadMetadata = require("./normalize-and-load-metadata"); +var _dynamicImport = require("./dynamic-import"); +var _getModuleName = require("./get-module-name"); +const { + booleanLiteral, + callExpression, + cloneNode, + directive, + directiveLiteral, + expressionStatement, + identifier, + isIdentifier, + memberExpression, + stringLiteral, + valueToNode, + variableDeclaration, + variableDeclarator +} = _t; +{ + { + { + exports.getDynamicImportSource = require("./dynamic-import").getDynamicImportSource; + } + } +} function rewriteModuleStatementsAndPrepareHeader(path, { - loose, exportName, strict, allowTopLevelThis, strictMode, noInterop, + importInterop = noInterop ? "none" : "babel", lazy, esNamespaceOnly, - constantReexports = loose, - enumerableModuleMeta = loose + filename, + constantReexports = arguments[1].loose, + enumerableModuleMeta = arguments[1].loose, + noIncompleteNsImportDetection }) { - assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script"); + (0, _normalizeAndLoadMetadata.validateImportInteropOption)(importInterop); + _assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script"); path.node.sourceType = "script"; const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, { - noInterop, + importInterop, initializeReexports: constantReexports, lazy, - esNamespaceOnly + esNamespaceOnly, + filename }); - if (!allowTopLevelThis) { (0, _rewriteThis.default)(path); } - (0, _rewriteLiveReferences.default)(path, meta); - if (strictMode !== false) { const hasStrict = path.node.directives.some(directive => { return directive.value.value === "use strict"; }); - if (!hasStrict) { - path.unshiftContainer("directives", t.directive(t.directiveLiteral("use strict"))); + path.unshiftContainer("directives", directive(directiveLiteral("use strict"))); } } - const headers = []; - if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) { headers.push(buildESModuleHeader(meta, enumerableModuleMeta)); } - const nameList = buildExportNameListDeclaration(path, meta); - if (nameList) { meta.exportNameListName = nameList.name; headers.push(nameList.statement); } - - headers.push(...buildExportInitializationStatements(path, meta, constantReexports)); + headers.push(...buildExportInitializationStatements(path, meta, constantReexports, noIncompleteNsImportDetection)); return { meta, headers }; } - function ensureStatementsHoisted(statements) { statements.forEach(header => { header._blockHoist = 3; }); } - function wrapInterop(programPath, expr, type) { if (type === "none") { return null; } - + if (type === "node-namespace") { + return callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, booleanLiteral(true)]); + } else if (type === "node-default") { + return null; + } let helper; - if (type === "default") { helper = "interopRequireDefault"; } else if (type === "namespace") { @@ -137,27 +147,22 @@ function wrapInterop(programPath, expr, type) { } else { throw new Error(`Unknown interop: ${type}`); } - - return t.callExpression(programPath.hub.addHelper(helper), [expr]); + return callExpression(programPath.hub.addHelper(helper), [expr]); } - function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports = false) { const statements = []; - let srcNamespace = t.identifier(sourceMetadata.name); - if (sourceMetadata.lazy) srcNamespace = t.callExpression(srcNamespace, []); - + let srcNamespace = identifier(sourceMetadata.name); + if (sourceMetadata.lazy) srcNamespace = callExpression(srcNamespace, []); for (const localName of sourceMetadata.importsNamespace) { if (localName === sourceMetadata.name) continue; statements.push(_template.default.statement`var NAME = SOURCE;`({ NAME: localName, - SOURCE: t.cloneNode(srcNamespace) + SOURCE: cloneNode(srcNamespace) })); } - if (constantReexports) { statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true)); } - for (const exportName of sourceMetadata.reexportNamespace) { statements.push((sourceMetadata.lazy ? _template.default.statement` Object.defineProperty(EXPORTS, "NAME", { @@ -169,23 +174,20 @@ function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexport ` : _template.default.statement`EXPORTS.NAME = NAMESPACE;`)({ EXPORTS: metadata.exportName, NAME: exportName, - NAMESPACE: t.cloneNode(srcNamespace) + NAMESPACE: cloneNode(srcNamespace) })); } - if (sourceMetadata.reexportAll) { - const statement = buildNamespaceReexport(metadata, t.cloneNode(srcNamespace), constantReexports); + const statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), constantReexports); statement.loc = sourceMetadata.reexportAll.loc; statements.push(statement); } - return statements; } - const ReexportTemplate = { constant: _template.default.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`, constantComputed: _template.default.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`, - spec: (0, _template.default)` + spec: _template.default.statement` Object.defineProperty(EXPORTS, "EXPORT_NAME", { enumerable: true, get: function() { @@ -194,28 +196,24 @@ const ReexportTemplate = { }); ` }; - -const buildReexportsFromMeta = (meta, metadata, constantReexports) => { - const namespace = metadata.lazy ? t.callExpression(t.identifier(metadata.name), []) : t.identifier(metadata.name); +function buildReexportsFromMeta(meta, metadata, constantReexports) { + const namespace = metadata.lazy ? callExpression(identifier(metadata.name), []) : identifier(metadata.name); const { stringSpecifiers } = meta; return Array.from(metadata.reexports, ([exportName, importName]) => { - let NAMESPACE_IMPORT; - - if (stringSpecifiers.has(importName)) { - NAMESPACE_IMPORT = t.memberExpression(t.cloneNode(namespace), t.stringLiteral(importName), true); + let NAMESPACE_IMPORT = cloneNode(namespace); + if (importName === "default" && metadata.interop === "node-default") {} else if (stringSpecifiers.has(importName)) { + NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, stringLiteral(importName), true); } else { - NAMESPACE_IMPORT = NAMESPACE_IMPORT = t.memberExpression(t.cloneNode(namespace), t.identifier(importName)); + NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, identifier(importName)); } - const astNodes = { EXPORTS: meta.exportName, EXPORT_NAME: exportName, NAMESPACE_IMPORT }; - - if (constantReexports) { + if (constantReexports || isIdentifier(NAMESPACE_IMPORT)) { if (stringSpecifiers.has(exportName)) { return ReexportTemplate.constantComputed(astNodes); } else { @@ -225,8 +223,7 @@ const buildReexportsFromMeta = (meta, metadata, constantReexports) => { return ReexportTemplate.spec(astNodes); } }); -}; - +} function buildESModuleHeader(metadata, enumerableModuleMeta = false) { return (enumerableModuleMeta ? _template.default.statement` EXPORTS.__esModule = true; @@ -238,7 +235,6 @@ function buildESModuleHeader(metadata, enumerableModuleMeta = false) { EXPORTS: metadata.exportName }); } - function buildNamespaceReexport(metadata, namespace, constantReexports) { return (constantReexports ? _template.default.statement` Object.keys(NAMESPACE).forEach(function(key) { @@ -271,84 +267,104 @@ function buildNamespaceReexport(metadata, namespace, constantReexports) { }) : null }); } - function buildExportNameListDeclaration(programPath, metadata) { const exportedVars = Object.create(null); - for (const data of metadata.local.values()) { for (const name of data.names) { exportedVars[name] = true; } } - let hasReexport = false; - for (const data of metadata.source.values()) { for (const exportName of data.reexports.keys()) { exportedVars[exportName] = true; } - for (const exportName of data.reexportNamespace) { exportedVars[exportName] = true; } - hasReexport = hasReexport || !!data.reexportAll; } - if (!hasReexport || Object.keys(exportedVars).length === 0) return null; const name = programPath.scope.generateUidIdentifier("exportNames"); delete exportedVars.default; return { name: name.name, - statement: t.variableDeclaration("var", [t.variableDeclarator(name, t.valueToNode(exportedVars))]) + statement: variableDeclaration("var", [variableDeclarator(name, valueToNode(exportedVars))]) }; } - -function buildExportInitializationStatements(programPath, metadata, constantReexports = false) { +function buildExportInitializationStatements(programPath, metadata, constantReexports = false, noIncompleteNsImportDetection = false) { const initStatements = []; - const exportNames = []; - for (const [localName, data] of metadata.local) { if (data.kind === "import") {} else if (data.kind === "hoisted") { - initStatements.push(buildInitStatement(metadata, data.names, t.identifier(localName))); - } else { - exportNames.push(...data.names); + initStatements.push([data.names[0], buildInitStatement(metadata, data.names, identifier(localName))]); + } else if (!noIncompleteNsImportDetection) { + for (const exportName of data.names) { + initStatements.push([exportName, null]); + } } } - for (const data of metadata.source.values()) { if (!constantReexports) { - initStatements.push(...buildReexportsFromMeta(metadata, data, false)); + const reexportsStatements = buildReexportsFromMeta(metadata, data, false); + const reexports = [...data.reexports.keys()]; + for (let i = 0; i < reexportsStatements.length; i++) { + initStatements.push([reexports[i], reexportsStatements[i]]); + } } - - for (const exportName of data.reexportNamespace) { - exportNames.push(exportName); + if (!noIncompleteNsImportDetection) { + for (const exportName of data.reexportNamespace) { + initStatements.push([exportName, null]); + } } } - - initStatements.push(...chunk(exportNames, 100).map(members => { - return buildInitStatement(metadata, members, programPath.scope.buildUndefinedNode()); - })); - return initStatements; + initStatements.sort(([a], [b]) => { + if (a < b) return -1; + if (b < a) return 1; + return 0; + }); + const results = []; + if (noIncompleteNsImportDetection) { + for (const [, initStatement] of initStatements) { + results.push(initStatement); + } + } else { + const chunkSize = 100; + for (let i = 0; i < initStatements.length; i += chunkSize) { + let uninitializedExportNames = []; + for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) { + const [exportName, initStatement] = initStatements[i + j]; + if (initStatement !== null) { + if (uninitializedExportNames.length > 0) { + results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode())); + uninitializedExportNames = []; + } + results.push(initStatement); + } else { + uninitializedExportNames.push(exportName); + } + } + if (uninitializedExportNames.length > 0) { + results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode())); + } + } + } + return results; } - const InitTemplate = { computed: _template.default.expression`EXPORTS["NAME"] = VALUE`, default: _template.default.expression`EXPORTS.NAME = VALUE` }; - function buildInitStatement(metadata, exportNames, initExpr) { const { stringSpecifiers, exportName: EXPORTS } = metadata; - return t.expressionStatement(exportNames.reduce((acc, exportName) => { + return expressionStatement(exportNames.reduce((acc, exportName) => { const params = { EXPORTS, NAME: exportName, VALUE: acc }; - if (stringSpecifiers.has(exportName)) { return InitTemplate.computed(params); } else { @@ -357,12 +373,4 @@ function buildInitStatement(metadata, exportNames, initExpr) { }, initExpr)); } -function chunk(array, size) { - const chunks = []; - - for (let i = 0; i < array.length; i += size) { - chunks.push(array.slice(i, i + size)); - } - - return chunks; -} \ No newline at end of file +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/index.js.map b/node_modules/@babel/helper-module-transforms/lib/index.js.map new file mode 100644 index 00000000..9d5f181c --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_assert","require","_t","_template","_helperModuleImports","_rewriteThis","_rewriteLiveReferences","_normalizeAndLoadMetadata","_dynamicImport","_getModuleName","booleanLiteral","callExpression","cloneNode","directive","directiveLiteral","expressionStatement","identifier","isIdentifier","memberExpression","stringLiteral","valueToNode","variableDeclaration","variableDeclarator","exports","getDynamicImportSource","rewriteModuleStatementsAndPrepareHeader","path","exportName","strict","allowTopLevelThis","strictMode","noInterop","importInterop","lazy","esNamespaceOnly","filename","constantReexports","arguments","loose","enumerableModuleMeta","noIncompleteNsImportDetection","validateImportInteropOption","assert","isModule","node","sourceType","meta","normalizeModuleAndLoadMetadata","initializeReexports","rewriteThis","rewriteLiveReferences","hasStrict","directives","some","value","unshiftContainer","headers","hasExports","push","buildESModuleHeader","nameList","buildExportNameListDeclaration","exportNameListName","name","statement","buildExportInitializationStatements","ensureStatementsHoisted","statements","forEach","header","_blockHoist","wrapInterop","programPath","expr","type","hub","addHelper","helper","Error","buildNamespaceInitStatements","metadata","sourceMetadata","srcNamespace","localName","importsNamespace","template","NAME","SOURCE","buildReexportsFromMeta","reexportNamespace","EXPORTS","NAMESPACE","reexportAll","buildNamespaceReexport","loc","ReexportTemplate","constant","constantComputed","spec","namespace","stringSpecifiers","Array","from","reexports","importName","NAMESPACE_IMPORT","interop","has","astNodes","EXPORT_NAME","VERIFY_NAME_LIST","EXPORTS_LIST","exportedVars","Object","create","data","local","values","names","hasReexport","source","keys","length","scope","generateUidIdentifier","default","initStatements","kind","buildInitStatement","reexportsStatements","i","sort","a","b","results","initStatement","chunkSize","uninitializedExportNames","j","buildUndefinedNode","InitTemplate","computed","expression","exportNames","initExpr","reduce","acc","params","VALUE"],"sources":["../src/index.ts"],"sourcesContent":["import assert from \"assert\";\nimport {\n booleanLiteral,\n callExpression,\n cloneNode,\n directive,\n directiveLiteral,\n expressionStatement,\n identifier,\n isIdentifier,\n memberExpression,\n stringLiteral,\n valueToNode,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport template from \"@babel/template\";\n\nimport { isModule } from \"@babel/helper-module-imports\";\n\nimport rewriteThis from \"./rewrite-this\";\nimport rewriteLiveReferences from \"./rewrite-live-references\";\nimport normalizeModuleAndLoadMetadata, {\n hasExports,\n isSideEffectImport,\n validateImportInteropOption,\n} from \"./normalize-and-load-metadata\";\nimport type {\n ImportInterop,\n InteropType,\n Lazy,\n ModuleMetadata,\n SourceModuleMetadata,\n} from \"./normalize-and-load-metadata\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport { buildDynamicImport } from \"./dynamic-import\";\n\nif (!process.env.BABEL_8_BREAKING) {\n if (!USE_ESM) {\n if (!IS_STANDALONE) {\n // eslint-disable-next-line no-restricted-globals\n exports.getDynamicImportSource =\n // eslint-disable-next-line no-restricted-globals\n require(\"./dynamic-import\").getDynamicImportSource;\n }\n }\n}\n\nexport { default as getModuleName } from \"./get-module-name\";\nexport type { PluginOptions } from \"./get-module-name\";\n\nexport { hasExports, isSideEffectImport, isModule, rewriteThis };\n\nexport interface RewriteModuleStatementsAndPrepareHeaderOptions {\n exportName?: string;\n strict: boolean;\n allowTopLevelThis?: boolean;\n strictMode: boolean;\n loose?: boolean;\n importInterop?: ImportInterop;\n noInterop?: boolean;\n lazy?: Lazy;\n esNamespaceOnly?: boolean;\n filename: string | undefined;\n constantReexports?: boolean | void;\n enumerableModuleMeta?: boolean | void;\n noIncompleteNsImportDetection?: boolean | void;\n}\n\n/**\n * Perform all of the generic ES6 module rewriting needed to handle initial\n * module processing. This function will rewrite the majority of the given\n * program to reference the modules described by the returned metadata,\n * and returns a list of statements for use when initializing the module.\n */\nexport function rewriteModuleStatementsAndPrepareHeader(\n path: NodePath,\n {\n exportName,\n strict,\n allowTopLevelThis,\n strictMode,\n noInterop,\n importInterop = noInterop ? \"none\" : \"babel\",\n lazy,\n esNamespaceOnly,\n filename,\n\n constantReexports = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n enumerableModuleMeta = process.env.BABEL_8_BREAKING\n ? undefined\n : arguments[1].loose,\n noIncompleteNsImportDetection,\n }: RewriteModuleStatementsAndPrepareHeaderOptions,\n) {\n validateImportInteropOption(importInterop);\n assert(isModule(path), \"Cannot process module statements in a script\");\n path.node.sourceType = \"script\";\n\n const meta = normalizeModuleAndLoadMetadata(path, exportName, {\n importInterop,\n initializeReexports: constantReexports,\n lazy,\n esNamespaceOnly,\n filename,\n });\n\n if (!allowTopLevelThis) {\n rewriteThis(path);\n }\n\n rewriteLiveReferences(path, meta);\n\n if (strictMode !== false) {\n const hasStrict = path.node.directives.some(directive => {\n return directive.value.value === \"use strict\";\n });\n if (!hasStrict) {\n path.unshiftContainer(\n \"directives\",\n directive(directiveLiteral(\"use strict\")),\n );\n }\n }\n\n const headers = [];\n if (hasExports(meta) && !strict) {\n headers.push(buildESModuleHeader(meta, enumerableModuleMeta));\n }\n\n const nameList = buildExportNameListDeclaration(path, meta);\n\n if (nameList) {\n meta.exportNameListName = nameList.name;\n headers.push(nameList.statement);\n }\n\n // Create all of the statically known named exports.\n headers.push(\n ...buildExportInitializationStatements(\n path,\n meta,\n constantReexports,\n noIncompleteNsImportDetection,\n ),\n );\n\n return { meta, headers };\n}\n\n/**\n * Flag a set of statements as hoisted above all else so that module init\n * statements all run before user code.\n */\nexport function ensureStatementsHoisted(statements: t.Statement[]) {\n // Force all of the header fields to be at the top of the file.\n statements.forEach(header => {\n // @ts-expect-error Fixme: handle _blockHoist property\n header._blockHoist = 3;\n });\n}\n\n/**\n * Given an expression for a standard import object, like \"require('foo')\",\n * wrap it in a call to the interop helpers based on the type.\n */\nexport function wrapInterop(\n programPath: NodePath,\n expr: t.Expression,\n type: InteropType,\n): t.CallExpression {\n if (type === \"none\") {\n return null;\n }\n\n if (type === \"node-namespace\") {\n return callExpression(programPath.hub.addHelper(\"interopRequireWildcard\"), [\n expr,\n booleanLiteral(true),\n ]);\n } else if (type === \"node-default\") {\n return null;\n }\n\n let helper;\n if (type === \"default\") {\n helper = \"interopRequireDefault\";\n } else if (type === \"namespace\") {\n helper = \"interopRequireWildcard\";\n } else {\n throw new Error(`Unknown interop: ${type}`);\n }\n\n return callExpression(programPath.hub.addHelper(helper), [expr]);\n}\n\n/**\n * Create the runtime initialization statements for a given requested source.\n * These will initialize all of the runtime import/export logic that\n * can't be handled statically by the statements created by\n * buildExportInitializationStatements().\n */\nexport function buildNamespaceInitStatements(\n metadata: ModuleMetadata,\n sourceMetadata: SourceModuleMetadata,\n constantReexports: boolean | void = false,\n) {\n const statements = [];\n\n let srcNamespace: t.Node = identifier(sourceMetadata.name);\n if (sourceMetadata.lazy) srcNamespace = callExpression(srcNamespace, []);\n\n for (const localName of sourceMetadata.importsNamespace) {\n if (localName === sourceMetadata.name) continue;\n\n // Create and assign binding to namespace object\n statements.push(\n template.statement`var NAME = SOURCE;`({\n NAME: localName,\n SOURCE: cloneNode(srcNamespace),\n }),\n );\n }\n if (constantReexports) {\n statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true));\n }\n for (const exportName of sourceMetadata.reexportNamespace) {\n // Assign export to namespace object.\n statements.push(\n (sourceMetadata.lazy\n ? template.statement`\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n `\n : template.statement`EXPORTS.NAME = NAMESPACE;`)({\n EXPORTS: metadata.exportName,\n NAME: exportName,\n NAMESPACE: cloneNode(srcNamespace),\n }),\n );\n }\n if (sourceMetadata.reexportAll) {\n const statement = buildNamespaceReexport(\n metadata,\n cloneNode(srcNamespace),\n constantReexports,\n );\n statement.loc = sourceMetadata.reexportAll.loc;\n\n // Iterate props creating getter for each prop.\n statements.push(statement);\n }\n return statements;\n}\n\nconst ReexportTemplate = {\n constant: template.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,\n constantComputed: template.statement`EXPORTS[\"EXPORT_NAME\"] = NAMESPACE_IMPORT;`,\n spec: template.statement`\n Object.defineProperty(EXPORTS, \"EXPORT_NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE_IMPORT;\n },\n });\n `,\n};\n\nfunction buildReexportsFromMeta(\n meta: ModuleMetadata,\n metadata: SourceModuleMetadata,\n constantReexports: boolean,\n) {\n const namespace = metadata.lazy\n ? callExpression(identifier(metadata.name), [])\n : identifier(metadata.name);\n\n const { stringSpecifiers } = meta;\n return Array.from(metadata.reexports, ([exportName, importName]) => {\n let NAMESPACE_IMPORT: t.Expression = cloneNode(namespace);\n if (importName === \"default\" && metadata.interop === \"node-default\") {\n // Nothing, it's ok as-is\n } else if (stringSpecifiers.has(importName)) {\n NAMESPACE_IMPORT = memberExpression(\n NAMESPACE_IMPORT,\n stringLiteral(importName),\n true,\n );\n } else {\n NAMESPACE_IMPORT = memberExpression(\n NAMESPACE_IMPORT,\n identifier(importName),\n );\n }\n const astNodes = {\n EXPORTS: meta.exportName,\n EXPORT_NAME: exportName,\n NAMESPACE_IMPORT,\n };\n if (constantReexports || isIdentifier(NAMESPACE_IMPORT)) {\n if (stringSpecifiers.has(exportName)) {\n return ReexportTemplate.constantComputed(astNodes);\n } else {\n return ReexportTemplate.constant(astNodes);\n }\n } else {\n return ReexportTemplate.spec(astNodes);\n }\n });\n}\n\n/**\n * Build an \"__esModule\" header statement setting the property on a given object.\n */\nfunction buildESModuleHeader(\n metadata: ModuleMetadata,\n enumerableModuleMeta: boolean | void = false,\n) {\n return (\n enumerableModuleMeta\n ? template.statement`\n EXPORTS.__esModule = true;\n `\n : template.statement`\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n `\n )({ EXPORTS: metadata.exportName });\n}\n\n/**\n * Create a re-export initialization loop for a specific imported namespace.\n */\nfunction buildNamespaceReexport(\n metadata: ModuleMetadata,\n namespace: t.Identifier | t.CallExpression,\n constantReexports: boolean | void,\n) {\n return (\n constantReexports\n ? template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n `\n : // Also skip already assigned bindings if they are strictly equal\n // to be somewhat more spec-compliant when a file has multiple\n // namespace re-exports that would cause a binding to be exported\n // multiple times. However, multiple bindings of the same name that\n // export the same primitive value are silently skipped\n // (the spec requires an \"ambiguous bindings\" early error here).\n template.statement`\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n `\n )({\n NAMESPACE: namespace,\n EXPORTS: metadata.exportName,\n VERIFY_NAME_LIST: metadata.exportNameListName\n ? template`\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n `({ EXPORTS_LIST: metadata.exportNameListName })\n : null,\n });\n}\n\n/**\n * Build a statement declaring a variable that contains all of the exported\n * variable names in an object so they can easily be referenced from an\n * export * from statement to check for conflicts.\n */\nfunction buildExportNameListDeclaration(\n programPath: NodePath,\n metadata: ModuleMetadata,\n) {\n const exportedVars = Object.create(null);\n for (const data of metadata.local.values()) {\n for (const name of data.names) {\n exportedVars[name] = true;\n }\n }\n\n let hasReexport = false;\n for (const data of metadata.source.values()) {\n for (const exportName of data.reexports.keys()) {\n exportedVars[exportName] = true;\n }\n for (const exportName of data.reexportNamespace) {\n exportedVars[exportName] = true;\n }\n\n hasReexport = hasReexport || !!data.reexportAll;\n }\n\n if (!hasReexport || Object.keys(exportedVars).length === 0) return null;\n\n const name = programPath.scope.generateUidIdentifier(\"exportNames\");\n\n delete exportedVars.default;\n\n return {\n name: name.name,\n statement: variableDeclaration(\"var\", [\n variableDeclarator(name, valueToNode(exportedVars)),\n ]),\n };\n}\n\n/**\n * Create a set of statements that will initialize all of the statically-known\n * export names with their expected values.\n */\nfunction buildExportInitializationStatements(\n programPath: NodePath,\n metadata: ModuleMetadata,\n constantReexports: boolean | void = false,\n noIncompleteNsImportDetection: boolean | void = false,\n) {\n const initStatements: Array<[string, t.Statement | null]> = [];\n\n for (const [localName, data] of metadata.local) {\n if (data.kind === \"import\") {\n // No-open since these are explicitly set with the \"reexports\" block.\n } else if (data.kind === \"hoisted\") {\n initStatements.push([\n // data.names is always of length 1 because a hoisted export\n // name must be id of a function declaration\n data.names[0],\n buildInitStatement(metadata, data.names, identifier(localName)),\n ]);\n } else if (!noIncompleteNsImportDetection) {\n for (const exportName of data.names) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n for (const data of metadata.source.values()) {\n if (!constantReexports) {\n const reexportsStatements = buildReexportsFromMeta(metadata, data, false);\n const reexports = [...data.reexports.keys()];\n for (let i = 0; i < reexportsStatements.length; i++) {\n initStatements.push([reexports[i], reexportsStatements[i]]);\n }\n }\n if (!noIncompleteNsImportDetection) {\n for (const exportName of data.reexportNamespace) {\n initStatements.push([exportName, null]);\n }\n }\n }\n\n // https://tc39.es/ecma262/#sec-module-namespace-exotic-objects\n // The [Exports] list is ordered as if an Array of those String values\n // had been sorted using %Array.prototype.sort% using undefined as comparefn\n initStatements.sort(([a], [b]) => {\n if (a < b) return -1;\n if (b < a) return 1;\n return 0;\n });\n\n const results = [];\n if (noIncompleteNsImportDetection) {\n for (const [, initStatement] of initStatements) {\n results.push(initStatement);\n }\n } else {\n // We generate init statements (`exports.a = exports.b = ... = void 0`)\n // for every 100 exported names to avoid deeply-nested AST structures.\n const chunkSize = 100;\n for (let i = 0; i < initStatements.length; i += chunkSize) {\n let uninitializedExportNames = [];\n for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {\n const [exportName, initStatement] = initStatements[i + j];\n if (initStatement !== null) {\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n // reset after uninitializedExportNames has been transformed\n // to init statements\n uninitializedExportNames = [];\n }\n results.push(initStatement);\n } else {\n uninitializedExportNames.push(exportName);\n }\n }\n if (uninitializedExportNames.length > 0) {\n results.push(\n buildInitStatement(\n metadata,\n uninitializedExportNames,\n programPath.scope.buildUndefinedNode(),\n ),\n );\n }\n }\n }\n\n return results;\n}\n\n/**\n * Given a set of export names, create a set of nested assignments to\n * initialize them all to a given expression.\n */\nconst InitTemplate = {\n computed: template.expression`EXPORTS[\"NAME\"] = VALUE`,\n default: template.expression`EXPORTS.NAME = VALUE`,\n};\n\nfunction buildInitStatement(\n metadata: ModuleMetadata,\n exportNames: string[],\n initExpr: t.Expression,\n) {\n const { stringSpecifiers, exportName: EXPORTS } = metadata;\n return expressionStatement(\n exportNames.reduce((acc, exportName) => {\n const params = {\n EXPORTS,\n NAME: exportName,\n VALUE: acc,\n };\n if (stringSpecifiers.has(exportName)) {\n return InitTemplate.computed(params);\n } else {\n return InitTemplate.default(params);\n }\n }, initExpr),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAA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,iBAAQ,CAACyD,UAAW;AAC/B,CAAC;AAED,SAASd,kBAAkBA,CACzBhD,QAAwB,EACxB+D,WAAqB,EACrBC,QAAsB,EACtB;EACA,MAAM;IAAE5C,gBAAgB;IAAEzE,UAAU,EAAE+D;EAAQ,CAAC,GAAGV,QAAQ;EAC1D,OAAOjE,mBAAmB,CACxBgI,WAAW,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEvH,UAAU,KAAK;IACtC,MAAMwH,MAAM,GAAG;MACbzD,OAAO;MACPJ,IAAI,EAAE3D,UAAU;MAChByH,KAAK,EAAEF;IACT,CAAC;IACD,IAAI9C,gBAAgB,CAACO,GAAG,CAAChF,UAAU,CAAC,EAAE;MACpC,OAAOiH,YAAY,CAACC,QAAQ,CAACM,MAAM,CAAC;IACtC,CAAC,MAAM;MACL,OAAOP,YAAY,CAACf,OAAO,CAACsB,MAAM,CAAC;IACrC;EACF,CAAC,EAAEH,QAAQ,CACb,CAAC;AACH"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js index a69f7cc6..edcac69a 100644 --- a/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js +++ b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js @@ -3,97 +3,107 @@ Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = normalizeModuleAndLoadMetadata; exports.hasExports = hasExports; exports.isSideEffectImport = isSideEffectImport; -exports.default = normalizeModuleAndLoadMetadata; - +exports.validateImportInteropOption = validateImportInteropOption; var _path = require("path"); - var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); - -var _helperSplitExportDeclaration = _interopRequireDefault(require("@babel/helper-split-export-declaration")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration"); function hasExports(metadata) { return metadata.hasExports; } - function isSideEffectImport(source) { return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll; } - +function validateImportInteropOption(importInterop) { + if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") { + throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`); + } + return importInterop; +} +function resolveImportInterop(importInterop, source, filename) { + if (typeof importInterop === "function") { + return validateImportInteropOption(importInterop(source, filename)); + } + return importInterop; +} function normalizeModuleAndLoadMetadata(programPath, exportName, { - noInterop = false, + importInterop, initializeReexports = false, lazy = false, - esNamespaceOnly = false -} = {}) { + esNamespaceOnly = false, + filename +}) { if (!exportName) { exportName = programPath.scope.generateUidIdentifier("exports").name; } - const stringSpecifiers = new Set(); nameAnonymousExports(programPath); const { local, - source, + sources, hasExports } = getModuleMetadata(programPath, { initializeReexports, lazy }, stringSpecifiers); - removeModuleDeclarations(programPath); - - for (const [, metadata] of source) { + removeImportExportDeclarations(programPath); + for (const [source, metadata] of sources) { if (metadata.importsNamespace.size > 0) { metadata.name = metadata.importsNamespace.values().next().value; } - - if (noInterop) metadata.interop = "none";else if (esNamespaceOnly) { - if (metadata.interop === "namespace") { - metadata.interop = "default"; - } + const resolvedInterop = resolveImportInterop(importInterop, source, filename); + if (resolvedInterop === "none") { + metadata.interop = "none"; + } else if (resolvedInterop === "node" && metadata.interop === "namespace") { + metadata.interop = "node-namespace"; + } else if (resolvedInterop === "node" && metadata.interop === "default") { + metadata.interop = "node-default"; + } else if (esNamespaceOnly && metadata.interop === "namespace") { + metadata.interop = "default"; } } - return { exportName, exportNameListName: null, hasExports, local, - source, + source: sources, stringSpecifiers }; } - function getExportSpecifierName(path, stringSpecifiers) { if (path.isIdentifier()) { return path.node.name; } else if (path.isStringLiteral()) { const stringValue = path.node.value; - if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) { stringSpecifiers.add(stringValue); } - return stringValue; } else { throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`); } } - +function assertExportSpecifier(path) { + if (path.isExportSpecifier()) { + return; + } else if (path.isExportNamespaceSpecifier()) { + throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`."); + } else { + throw path.buildCodeFrameError("Unexpected export specifier type"); + } +} function getModuleMetadata(programPath, { lazy, initializeReexports }, stringSpecifiers) { const localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers); const sourceData = new Map(); - const getData = sourceNode => { const source = sourceNode.value; let data = sourceData.get(source); - if (!data) { data = { name: programPath.scope.generateUidIdentifier((0, _path.basename)(source, (0, _path.extname)(source))).name, @@ -104,14 +114,13 @@ function getModuleMetadata(programPath, { reexports: new Map(), reexportNamespace: new Set(), reexportAll: null, - lazy: false + lazy: false, + referenced: false }; sourceData.set(source, data); } - return data; }; - let hasExports = false; programPath.get("body").forEach(child => { if (child.isImportDeclaration()) { @@ -122,35 +131,35 @@ function getModuleMetadata(programPath, { const localName = spec.get("local").node.name; data.imports.set(localName, "default"); const reexport = localData.get(localName); - if (reexport) { localData.delete(localName); reexport.names.forEach(name => { data.reexports.set(name, "default"); }); + data.referenced = true; } } else if (spec.isImportNamespaceSpecifier()) { const localName = spec.get("local").node.name; data.importsNamespace.add(localName); const reexport = localData.get(localName); - if (reexport) { localData.delete(localName); reexport.names.forEach(name => { data.reexportNamespace.add(name); }); + data.referenced = true; } } else if (spec.isImportSpecifier()) { const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers); const localName = spec.get("local").node.name; data.imports.set(localName, importName); const reexport = localData.get(localName); - if (reexport) { localData.delete(localName); reexport.names.forEach(name => { data.reexports.set(name, importName); }); + data.referenced = true; } } }); @@ -161,19 +170,17 @@ function getModuleMetadata(programPath, { data.reexportAll = { loc: child.node.loc }; + data.referenced = true; } else if (child.isExportNamedDeclaration() && child.node.source) { hasExports = true; const data = getData(child.node.source); if (!data.loc) data.loc = child.node.loc; child.get("specifiers").forEach(spec => { - if (!spec.isExportSpecifier()) { - throw spec.buildCodeFrameError("Unexpected export specifier type"); - } - + assertExportSpecifier(spec); const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers); const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers); data.reexports.set(exportName, importName); - + data.referenced = true; if (exportName === "__esModule") { throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".'); } @@ -182,35 +189,28 @@ function getModuleMetadata(programPath, { hasExports = true; } }); - for (const metadata of sourceData.values()) { let needsDefault = false; let needsNamed = false; - if (metadata.importsNamespace.size > 0) { needsDefault = true; needsNamed = true; } - if (metadata.reexportAll) { needsNamed = true; } - for (const importName of metadata.imports.values()) { if (importName === "default") needsDefault = true;else needsNamed = true; } - for (const importName of metadata.reexports.values()) { if (importName === "default") needsDefault = true;else needsNamed = true; } - if (needsDefault && needsNamed) { metadata.interop = "namespace"; } else if (needsDefault) { metadata.interop = "default"; } } - for (const [source, metadata] of sourceData) { if (lazy !== false && !(isSideEffectImport(metadata) || metadata.reexportAll)) { if (lazy === true) { @@ -224,35 +224,33 @@ function getModuleMetadata(programPath, { } } } - return { hasExports, local: localData, - source: sourceData + sources: sourceData }; } - function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) { const bindingKindLookup = new Map(); programPath.get("body").forEach(child => { let kind; - if (child.isImportDeclaration()) { kind = "import"; } else { - if (child.isExportDefaultDeclaration()) child = child.get("declaration"); - + if (child.isExportDefaultDeclaration()) { + child = child.get("declaration"); + } if (child.isExportNamedDeclaration()) { if (child.node.declaration) { child = child.get("declaration"); } else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) { - child.node.specifiers.forEach(specifier => { - bindingKindLookup.set(specifier.local.name, "block"); + child.get("specifiers").forEach(spec => { + assertExportSpecifier(spec); + bindingKindLookup.set(spec.get("local").node.name, "block"); }); return; } } - if (child.isFunctionDeclaration()) { kind = "hoisted"; } else if (child.isClassDeclaration()) { @@ -267,34 +265,27 @@ function getLocalExportMetadata(programPath, initializeReexports, stringSpecifie return; } } - Object.keys(child.getOuterBindingIdentifiers()).forEach(name => { bindingKindLookup.set(name, kind); }); }); const localMetadata = new Map(); - const getLocalMetadata = idPath => { const localName = idPath.node.name; let metadata = localMetadata.get(localName); - if (!metadata) { const kind = bindingKindLookup.get(localName); - if (kind === undefined) { throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`); } - metadata = { names: [], kind }; localMetadata.set(localName, metadata); } - return metadata; }; - programPath.get("body").forEach(child => { if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) { if (child.node.declaration) { @@ -304,7 +295,6 @@ function getLocalExportMetadata(programPath, initializeReexports, stringSpecifie if (name === "__esModule") { throw declaration.buildCodeFrameError('Illegal export "__esModule".'); } - getLocalMetadata(ids[name]).names.push(name); }); } else { @@ -313,17 +303,14 @@ function getLocalExportMetadata(programPath, initializeReexports, stringSpecifie const exported = spec.get("exported"); const localMetadata = getLocalMetadata(local); const exportName = getExportSpecifierName(exported, stringSpecifiers); - if (exportName === "__esModule") { throw exported.buildCodeFrameError('Illegal export "__esModule".'); } - localMetadata.names.push(exportName); }); } } else if (child.isExportDefaultDeclaration()) { const declaration = child.get("declaration"); - if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) { getLocalMetadata(declaration.get("id")).names.push("default"); } else { @@ -333,15 +320,13 @@ function getLocalExportMetadata(programPath, initializeReexports, stringSpecifie }); return localMetadata; } - function nameAnonymousExports(programPath) { programPath.get("body").forEach(child => { if (!child.isExportDefaultDeclaration()) return; (0, _helperSplitExportDeclaration.default)(child); }); } - -function removeModuleDeclarations(programPath) { +function removeImportExportDeclarations(programPath) { programPath.get("body").forEach(child => { if (child.isImportDeclaration()) { child.remove(); @@ -354,7 +339,6 @@ function removeModuleDeclarations(programPath) { } } else if (child.isExportDefaultDeclaration()) { const declaration = child.get("declaration"); - if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) { declaration._blockHoist = child.node._blockHoist; child.replaceWith(declaration); @@ -365,4 +349,6 @@ function removeModuleDeclarations(programPath) { child.remove(); } }); -} \ No newline at end of file +} + +//# sourceMappingURL=normalize-and-load-metadata.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map new file mode 100644 index 00000000..9fe19aaa --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_path","require","_helperValidatorIdentifier","_helperSplitExportDeclaration","hasExports","metadata","isSideEffectImport","source","imports","size","importsNamespace","reexports","reexportNamespace","reexportAll","validateImportInteropOption","importInterop","Error","resolveImportInterop","filename","normalizeModuleAndLoadMetadata","programPath","exportName","initializeReexports","lazy","esNamespaceOnly","scope","generateUidIdentifier","name","stringSpecifiers","Set","nameAnonymousExports","local","sources","getModuleMetadata","removeImportExportDeclarations","values","next","value","resolvedInterop","interop","exportNameListName","getExportSpecifierName","path","isIdentifier","node","isStringLiteral","stringValue","isIdentifierName","add","type","assertExportSpecifier","isExportSpecifier","isExportNamespaceSpecifier","buildCodeFrameError","localData","getLocalExportMetadata","sourceData","Map","getData","sourceNode","data","get","basename","extname","loc","referenced","set","forEach","child","isImportDeclaration","spec","isImportDefaultSpecifier","localName","reexport","delete","names","isImportNamespaceSpecifier","isImportSpecifier","importName","isExportAllDeclaration","isExportNamedDeclaration","isExportDefaultDeclaration","needsDefault","needsNamed","test","Array","isArray","indexOf","bindingKindLookup","kind","declaration","isFunctionDeclaration","isClassDeclaration","isVariableDeclaration","Object","keys","getOuterBindingIdentifiers","localMetadata","getLocalMetadata","idPath","undefined","ids","getOuterBindingIdentifierPaths","push","exported","splitExportDeclaration","remove","_blockHoist","replaceWith"],"sources":["../src/normalize-and-load-metadata.ts"],"sourcesContent":["import { basename, extname } from \"path\";\nimport type * as t from \"@babel/types\";\n\nimport { isIdentifierName } from \"@babel/helper-validator-identifier\";\nimport splitExportDeclaration from \"@babel/helper-split-export-declaration\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport interface ModuleMetadata {\n exportName: string;\n // The name of the variable that will reference an object containing export names.\n exportNameListName: null | string;\n hasExports: boolean;\n // Lookup from local binding to export information.\n local: Map;\n // Lookup of source file to source file metadata.\n source: Map;\n // List of names that should only be printed as string literals.\n // i.e. `import { \"any unicode\" as foo } from \"some-module\"`\n // `stringSpecifiers` is Set(1) [\"any unicode\"]\n // In most cases `stringSpecifiers` is an empty Set\n stringSpecifiers: Set;\n}\n\nexport type InteropType =\n | \"default\" // Babel interop for default-only imports\n | \"namespace\" // Babel interop for namespace or default+named imports\n | \"node-default\" // Node.js interop for default-only imports\n | \"node-namespace\" // Node.js interop for namespace or default+named imports\n | \"none\"; // No interop, or named-only imports\n\nexport type ImportInterop =\n | \"none\"\n | \"babel\"\n | \"node\"\n | ((source: string, filename?: string) => \"none\" | \"babel\" | \"node\");\n\nexport type Lazy = boolean | string[] | ((source: string) => boolean);\n\nexport interface SourceModuleMetadata {\n // A unique variable name to use for this namespace object. Centralized for simplicity.\n name: string;\n loc: t.SourceLocation | undefined | null;\n interop: InteropType;\n // Local binding to reference from this source namespace. Key: Local name, value: Import name\n imports: Map;\n // Local names that reference namespace object.\n importsNamespace: Set;\n // Reexports to create for namespace. Key: Export name, value: Import name\n reexports: Map;\n // List of names to re-export namespace as.\n reexportNamespace: Set;\n // Tracks if the source should be re-exported.\n reexportAll: null | {\n loc: t.SourceLocation | undefined | null;\n };\n lazy?: Lazy;\n referenced: boolean;\n}\n\nexport interface LocalExportMetadata {\n names: Array; // names of exports,\n kind: \"import\" | \"hoisted\" | \"block\" | \"var\";\n}\n\n/**\n * Check if the module has any exports that need handling.\n */\nexport function hasExports(metadata: ModuleMetadata) {\n return metadata.hasExports;\n}\n\n/**\n * Check if a given source is an anonymous import, e.g. \"import 'foo';\"\n */\nexport function isSideEffectImport(source: SourceModuleMetadata) {\n return (\n source.imports.size === 0 &&\n source.importsNamespace.size === 0 &&\n source.reexports.size === 0 &&\n source.reexportNamespace.size === 0 &&\n !source.reexportAll\n );\n}\n\nexport function validateImportInteropOption(\n importInterop: any,\n): importInterop is ImportInterop {\n if (\n typeof importInterop !== \"function\" &&\n importInterop !== \"none\" &&\n importInterop !== \"babel\" &&\n importInterop !== \"node\"\n ) {\n throw new Error(\n `.importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received ${importInterop}).`,\n );\n }\n return importInterop;\n}\n\nfunction resolveImportInterop(\n importInterop: ImportInterop,\n source: string,\n filename: string | undefined,\n) {\n if (typeof importInterop === \"function\") {\n return validateImportInteropOption(importInterop(source, filename));\n }\n return importInterop;\n}\n\n/**\n * Remove all imports and exports from the file, and return all metadata\n * needed to reconstruct the module's behavior.\n */\nexport default function normalizeModuleAndLoadMetadata(\n programPath: NodePath,\n exportName: string,\n {\n importInterop,\n initializeReexports = false,\n lazy = false,\n esNamespaceOnly = false,\n filename,\n }: {\n importInterop: ImportInterop;\n initializeReexports: boolean | void;\n lazy: Lazy;\n esNamespaceOnly: boolean;\n filename: string;\n },\n): ModuleMetadata {\n if (!exportName) {\n exportName = programPath.scope.generateUidIdentifier(\"exports\").name;\n }\n const stringSpecifiers = new Set();\n\n nameAnonymousExports(programPath);\n\n const { local, sources, hasExports } = getModuleMetadata(\n programPath,\n { initializeReexports, lazy },\n stringSpecifiers,\n );\n\n removeImportExportDeclarations(programPath);\n\n // Reuse the imported namespace name if there is one.\n for (const [source, metadata] of sources) {\n if (metadata.importsNamespace.size > 0) {\n // This is kind of gross. If we stop using `loose: true` we should\n // just make this destructuring assignment.\n metadata.name = metadata.importsNamespace.values().next().value;\n }\n\n const resolvedInterop = resolveImportInterop(\n importInterop,\n source,\n filename,\n );\n\n if (resolvedInterop === \"none\") {\n metadata.interop = \"none\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"namespace\") {\n metadata.interop = \"node-namespace\";\n } else if (resolvedInterop === \"node\" && metadata.interop === \"default\") {\n metadata.interop = \"node-default\";\n } else if (esNamespaceOnly && metadata.interop === \"namespace\") {\n // Both the default and namespace interops pass through __esModule\n // objects, but the namespace interop is used to enable Babel's\n // destructuring-like interop behavior for normal CommonJS.\n // Since some tooling has started to remove that behavior, we expose\n // it as the `esNamespace` option.\n metadata.interop = \"default\";\n }\n }\n\n return {\n exportName,\n exportNameListName: null,\n hasExports,\n local,\n source: sources,\n stringSpecifiers,\n };\n}\n\nfunction getExportSpecifierName(\n path: NodePath,\n stringSpecifiers: Set,\n): string {\n if (path.isIdentifier()) {\n return path.node.name;\n } else if (path.isStringLiteral()) {\n const stringValue = path.node.value;\n // add specifier value to `stringSpecifiers` only when it can not be converted to an identifier name\n // i.e In `import { \"foo\" as bar }`\n // we do not consider `\"foo\"` to be a `stringSpecifier` because we can treat it as\n // `import { foo as bar }`\n // This helps minimize the size of `stringSpecifiers` and reduce overhead of checking valid identifier names\n // when building transpiled code from metadata\n if (!isIdentifierName(stringValue)) {\n stringSpecifiers.add(stringValue);\n }\n return stringValue;\n } else {\n throw new Error(\n `Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`,\n );\n }\n}\n\nfunction assertExportSpecifier(\n path: NodePath,\n): asserts path is NodePath {\n if (path.isExportSpecifier()) {\n return;\n } else if (path.isExportNamespaceSpecifier()) {\n throw path.buildCodeFrameError(\n \"Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`.\",\n );\n } else {\n throw path.buildCodeFrameError(\"Unexpected export specifier type\");\n }\n}\n\n/**\n * Get metadata about the imports and exports present in this module.\n */\nfunction getModuleMetadata(\n programPath: NodePath,\n {\n lazy,\n initializeReexports,\n }: {\n // todo(flow-ts) changed from boolean, to match expected usage inside the function\n lazy: boolean | string[] | ((source: string) => boolean);\n initializeReexports: boolean | void;\n },\n stringSpecifiers: Set,\n) {\n const localData = getLocalExportMetadata(\n programPath,\n initializeReexports,\n stringSpecifiers,\n );\n\n const sourceData = new Map();\n const getData = (sourceNode: t.StringLiteral) => {\n const source = sourceNode.value;\n\n let data = sourceData.get(source);\n if (!data) {\n data = {\n name: programPath.scope.generateUidIdentifier(\n basename(source, extname(source)),\n ).name,\n\n interop: \"none\",\n\n loc: null,\n\n // Data about the requested sources and names.\n imports: new Map(),\n importsNamespace: new Set(),\n\n // Metadata about data that is passed directly from source to export.\n reexports: new Map(),\n reexportNamespace: new Set(),\n reexportAll: null,\n\n lazy: false,\n\n referenced: false,\n };\n sourceData.set(source, data);\n }\n return data;\n };\n let hasExports = false;\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n const data = getData(child.node.source);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n if (spec.isImportDefaultSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, \"default\");\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, \"default\");\n });\n data.referenced = true;\n }\n } else if (spec.isImportNamespaceSpecifier()) {\n const localName = spec.get(\"local\").node.name;\n\n data.importsNamespace.add(localName);\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexportNamespace.add(name);\n });\n data.referenced = true;\n }\n } else if (spec.isImportSpecifier()) {\n const importName = getExportSpecifierName(\n spec.get(\"imported\"),\n stringSpecifiers,\n );\n const localName = spec.get(\"local\").node.name;\n\n data.imports.set(localName, importName);\n\n const reexport = localData.get(localName);\n if (reexport) {\n localData.delete(localName);\n\n reexport.names.forEach(name => {\n data.reexports.set(name, importName);\n });\n data.referenced = true;\n }\n }\n });\n } else if (child.isExportAllDeclaration()) {\n hasExports = true;\n const data = getData(child.node.source);\n if (!data.loc) data.loc = child.node.loc;\n\n data.reexportAll = {\n loc: child.node.loc,\n };\n data.referenced = true;\n } else if (child.isExportNamedDeclaration() && child.node.source) {\n hasExports = true;\n const data = getData(child.node.source);\n if (!data.loc) data.loc = child.node.loc;\n\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n const importName = getExportSpecifierName(\n spec.get(\"local\"),\n stringSpecifiers,\n );\n const exportName = getExportSpecifierName(\n spec.get(\"exported\"),\n stringSpecifiers,\n );\n\n data.reexports.set(exportName, importName);\n data.referenced = true;\n\n if (exportName === \"__esModule\") {\n throw spec\n .get(\"exported\")\n .buildCodeFrameError('Illegal export \"__esModule\".');\n }\n });\n } else if (\n child.isExportNamedDeclaration() ||\n child.isExportDefaultDeclaration()\n ) {\n hasExports = true;\n }\n });\n\n for (const metadata of sourceData.values()) {\n let needsDefault = false;\n let needsNamed = false;\n\n if (metadata.importsNamespace.size > 0) {\n needsDefault = true;\n needsNamed = true;\n }\n\n if (metadata.reexportAll) {\n needsNamed = true;\n }\n\n for (const importName of metadata.imports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n for (const importName of metadata.reexports.values()) {\n if (importName === \"default\") needsDefault = true;\n else needsNamed = true;\n }\n\n if (needsDefault && needsNamed) {\n // TODO(logan): Using the namespace interop here is unfortunate. Revisit.\n metadata.interop = \"namespace\";\n } else if (needsDefault) {\n metadata.interop = \"default\";\n }\n }\n\n for (const [source, metadata] of sourceData) {\n if (\n lazy !== false &&\n !(isSideEffectImport(metadata) || metadata.reexportAll)\n ) {\n if (lazy === true) {\n // 'true' means that local relative files are eagerly loaded and\n // dependency modules are loaded lazily.\n metadata.lazy = !/\\./.test(source);\n } else if (Array.isArray(lazy)) {\n metadata.lazy = lazy.indexOf(source) !== -1;\n } else if (typeof lazy === \"function\") {\n metadata.lazy = lazy(source);\n } else {\n throw new Error(`.lazy must be a boolean, string array, or function`);\n }\n }\n }\n\n return {\n hasExports,\n local: localData,\n sources: sourceData,\n };\n}\n\ntype ModuleBindingKind = \"import\" | \"hoisted\" | \"block\" | \"var\";\n/**\n * Get metadata about local variables that are exported.\n */\nfunction getLocalExportMetadata(\n programPath: NodePath,\n initializeReexports: boolean | void,\n stringSpecifiers: Set,\n): Map {\n const bindingKindLookup = new Map();\n\n programPath.get(\"body\").forEach((child: NodePath) => {\n let kind: ModuleBindingKind;\n if (child.isImportDeclaration()) {\n kind = \"import\";\n } else {\n if (child.isExportDefaultDeclaration()) {\n child = child.get(\"declaration\");\n }\n if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n child = child.get(\"declaration\");\n } else if (\n initializeReexports &&\n child.node.source &&\n child.get(\"source\").isStringLiteral()\n ) {\n child.get(\"specifiers\").forEach(spec => {\n assertExportSpecifier(spec);\n bindingKindLookup.set(spec.get(\"local\").node.name, \"block\");\n });\n return;\n }\n }\n\n if (child.isFunctionDeclaration()) {\n kind = \"hoisted\";\n } else if (child.isClassDeclaration()) {\n kind = \"block\";\n } else if (child.isVariableDeclaration({ kind: \"var\" })) {\n kind = \"var\";\n } else if (child.isVariableDeclaration()) {\n kind = \"block\";\n } else {\n return;\n }\n }\n\n Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {\n bindingKindLookup.set(name, kind);\n });\n });\n\n const localMetadata = new Map();\n const getLocalMetadata = (idPath: NodePath) => {\n const localName = idPath.node.name;\n let metadata = localMetadata.get(localName);\n\n if (!metadata) {\n const kind = bindingKindLookup.get(localName);\n\n if (kind === undefined) {\n throw idPath.buildCodeFrameError(\n `Exporting local \"${localName}\", which is not declared.`,\n );\n }\n\n metadata = {\n names: [],\n kind,\n };\n localMetadata.set(localName, metadata);\n }\n return metadata;\n };\n\n programPath.get(\"body\").forEach(child => {\n if (\n child.isExportNamedDeclaration() &&\n (initializeReexports || !child.node.source)\n ) {\n if (child.node.declaration) {\n const declaration = child.get(\"declaration\");\n const ids = declaration.getOuterBindingIdentifierPaths();\n Object.keys(ids).forEach(name => {\n if (name === \"__esModule\") {\n throw declaration.buildCodeFrameError(\n 'Illegal export \"__esModule\".',\n );\n }\n getLocalMetadata(ids[name]).names.push(name);\n });\n } else {\n child.get(\"specifiers\").forEach(spec => {\n const local = spec.get(\"local\");\n const exported = spec.get(\"exported\");\n const localMetadata = getLocalMetadata(local);\n const exportName = getExportSpecifierName(exported, stringSpecifiers);\n\n if (exportName === \"__esModule\") {\n throw exported.buildCodeFrameError('Illegal export \"__esModule\".');\n }\n localMetadata.names.push(exportName);\n });\n }\n } else if (child.isExportDefaultDeclaration()) {\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n // @ts-expect-error todo(flow->ts): improve babel-types\n getLocalMetadata(declaration.get(\"id\")).names.push(\"default\");\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n }\n });\n return localMetadata;\n}\n\n/**\n * Ensure that all exported values have local binding names.\n */\nfunction nameAnonymousExports(programPath: NodePath) {\n // Name anonymous exported locals.\n programPath.get(\"body\").forEach(child => {\n if (!child.isExportDefaultDeclaration()) return;\n splitExportDeclaration(child);\n });\n}\n\nfunction removeImportExportDeclarations(programPath: NodePath) {\n programPath.get(\"body\").forEach(child => {\n if (child.isImportDeclaration()) {\n child.remove();\n } else if (child.isExportNamedDeclaration()) {\n if (child.node.declaration) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n child.node.declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(child.node.declaration);\n } else {\n child.remove();\n }\n } else if (child.isExportDefaultDeclaration()) {\n // export default foo;\n const declaration = child.get(\"declaration\");\n if (\n declaration.isFunctionDeclaration() ||\n declaration.isClassDeclaration()\n ) {\n // @ts-expect-error todo(flow->ts): avoid mutations\n declaration._blockHoist = child.node._blockHoist;\n child.replaceWith(\n declaration as NodePath,\n );\n } else {\n // These should have been removed by the nameAnonymousExports() call.\n throw declaration.buildCodeFrameError(\n \"Unexpected default expression export.\",\n );\n }\n } else if (child.isExportAllDeclaration()) {\n child.remove();\n }\n });\n}\n"],"mappings":";;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,0BAAA,GAAAD,OAAA;AACA,IAAAE,6BAAA,GAAAF,OAAA;AA+DO,SAASG,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C;AACJ;AAEA,SAASlC,8BAA8BA,CAACd,WAAgC,EAAE;EACxEA,WAAW,CAACyC,GAAG,CAAC,MAAM,CAAC,CAACM,OAAO,CAACC,KAAK,IAAI;IACvC,IAAIA,KAAK,CAACC,mBAAmB,CAAC,CAAC,EAAE;MAC/BD,KAAK,CAACsC,MAAM,CAAC,CAAC;IAChB,CAAC,MAAM,IAAItC,KAAK,CAACY,wBAAwB,CAAC,CAAC,EAAE;MAC3C,IAAIZ,KAAK,CAACxB,IAAI,CAAC8C,WAAW,EAAE;QAE1BtB,KAAK,CAACxB,IAAI,CAAC8C,WAAW,CAACiB,WAAW,GAAGvC,KAAK,CAACxB,IAAI,CAAC+D,WAAW;QAC3DvC,KAAK,CAACwC,WAAW,CAACxC,KAAK,CAACxB,IAAI,CAAC8C,WAAW,CAAC;MAC3C,CAAC,MAAM;QACLtB,KAAK,CAACsC,MAAM,CAAC,CAAC;MAChB;IACF,CAAC,MAAM,IAAItC,KAAK,CAACa,0BAA0B,CAAC,CAAC,EAAE;MAE7C,MAAMS,WAAW,GAAGtB,KAAK,CAACP,GAAG,CAAC,aAAa,CAAC;MAC5C,IACE6B,WAAW,CAACC,qBAAqB,CAAC,CAAC,IACnCD,WAAW,CAACE,kBAAkB,CAAC,CAAC,EAChC;QAEAF,WAAW,CAACiB,WAAW,GAAGvC,KAAK,CAACxB,IAAI,CAAC+D,WAAW;QAChDvC,KAAK,CAACwC,WAAW,CACflB,WACF,CAAC;MACH,CAAC,MAAM;QAEL,MAAMA,WAAW,CAACrC,mBAAmB,CACnC,uCACF,CAAC;MACH;IACF,CAAC,MAAM,IAAIe,KAAK,CAACW,sBAAsB,CAAC,CAAC,EAAE;MACzCX,KAAK,CAACsC,MAAM,CAAC,CAAC;IAChB;EACF,CAAC,CAAC;AACJ"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js index ada3fe7f..37116301 100644 --- a/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js +++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js @@ -4,50 +4,68 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = rewriteLiveReferences; - -var t = _interopRequireWildcard(require("@babel/types")); - -var _template = _interopRequireDefault(require("@babel/template")); - -var _helperSimpleAccess = _interopRequireDefault(require("@babel/helper-simple-access")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const assert = require("assert"); - +var _assert = require("assert"); +var _t = require("@babel/types"); +var _template = require("@babel/template"); +var _helperSimpleAccess = require("@babel/helper-simple-access"); +const { + assignmentExpression, + callExpression, + cloneNode, + expressionStatement, + getOuterBindingIdentifiers, + identifier, + isMemberExpression, + isVariableDeclaration, + jsxIdentifier, + jsxMemberExpression, + memberExpression, + numericLiteral, + sequenceExpression, + stringLiteral, + variableDeclaration, + variableDeclarator +} = _t; +function isInType(path) { + do { + switch (path.parent.type) { + case "TSTypeAnnotation": + case "TSTypeAliasDeclaration": + case "TSTypeReference": + case "TypeAnnotation": + case "TypeAlias": + return true; + case "ExportSpecifier": + return path.parentPath.parent.exportKind === "type"; + default: + if (path.parentPath.isStatement() || path.parentPath.isExpression()) { + return false; + } + } + } while (path = path.parentPath); +} function rewriteLiveReferences(programPath, metadata) { const imported = new Map(); const exported = new Map(); - const requeueInParent = path => { programPath.requeue(path); }; - for (const [source, data] of metadata.source) { for (const [localName, importName] of data.imports) { imported.set(localName, [source, importName, null]); } - for (const localName of data.importsNamespace) { imported.set(localName, [source, null, localName]); } } - for (const [local, data] of metadata.local) { let exportMeta = exported.get(local); - if (!exportMeta) { exportMeta = []; exported.set(local, exportMeta); } - exportMeta.push(...data.names); } - const rewriteBindingInitVisitorState = { metadata, requeueInParent, @@ -55,7 +73,10 @@ function rewriteLiveReferences(programPath, metadata) { exported }; programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState); - (0, _helperSimpleAccess.default)(programPath, new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())])); + const bindingNames = new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())]); + { + (0, _helperSimpleAccess.default)(programPath, bindingNames, false); + } const rewriteReferencesVisitorState = { seen: new WeakSet(), metadata, @@ -65,26 +86,28 @@ function rewriteLiveReferences(programPath, metadata) { exported, buildImportReference: ([source, importName, localName], identNode) => { const meta = metadata.source.get(source); - + meta.referenced = true; if (localName) { - if (meta.lazy) identNode = t.callExpression(identNode, []); + if (meta.lazy) { + identNode = callExpression(identNode, []); + } return identNode; } - - let namespace = t.identifier(meta.name); - if (meta.lazy) namespace = t.callExpression(namespace, []); + let namespace = identifier(meta.name); + if (meta.lazy) namespace = callExpression(namespace, []); + if (importName === "default" && meta.interop === "node-default") { + return namespace; + } const computed = metadata.stringSpecifiers.has(importName); - return t.memberExpression(namespace, computed ? t.stringLiteral(importName) : t.identifier(importName), computed); + return memberExpression(namespace, computed ? stringLiteral(importName) : identifier(importName), computed); } }; programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState); } - const rewriteBindingInitVisitor = { Scope(path) { path.skip(); }, - ClassDeclaration(path) { const { requeueInParent, @@ -97,14 +120,12 @@ const rewriteBindingInitVisitor = { if (!id) throw new Error("Expected class to have a name"); const localName = id.name; const exportNames = exported.get(localName) || []; - if (exportNames.length > 0) { - const statement = t.expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, t.identifier(localName))); + const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope)); statement._blockHoist = path.node._blockHoist; requeueInParent(path.insertAfter(statement)[0]); } }, - VariableDeclaration(path) { const { requeueInParent, @@ -113,27 +134,29 @@ const rewriteBindingInitVisitor = { } = this; Object.keys(path.getOuterBindingIdentifiers()).forEach(localName => { const exportNames = exported.get(localName) || []; - if (exportNames.length > 0) { - const statement = t.expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, t.identifier(localName))); + const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName), path.scope)); statement._blockHoist = path.node._blockHoist; requeueInParent(path.insertAfter(statement)[0]); } }); } - }; - -const buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr) => { +const buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr, scope) => { + const exportsObjectName = metadata.exportName; + for (let currentScope = scope; currentScope != null; currentScope = currentScope.parent) { + if (currentScope.hasOwnBinding(exportsObjectName)) { + currentScope.rename(exportsObjectName); + } + } return (exportNames || []).reduce((expr, exportName) => { const { stringSpecifiers } = metadata; const computed = stringSpecifiers.has(exportName); - return t.assignmentExpression("=", t.memberExpression(t.identifier(metadata.exportName), computed ? t.stringLiteral(exportName) : t.identifier(exportName), computed), expr); + return assignmentExpression("=", memberExpression(identifier(exportsObjectName), computed ? stringLiteral(exportName) : identifier(exportName), computed), expr); }, localExpr); }; - const buildImportThrow = localName => { return _template.default.expression.ast` (function() { @@ -141,7 +164,6 @@ const buildImportThrow = localName => { })() `; }; - const rewriteReferencesVisitor = { ReferencedIdentifier(path) { const { @@ -155,37 +177,71 @@ const rewriteReferencesVisitor = { seen.add(path.node); const localName = path.node.name; const importData = imported.get(localName); - if (importData) { + if (isInType(path)) { + throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. ` + `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`); + } const localBinding = path.scope.getBinding(localName); const rootBinding = scope.getBinding(localName); if (rootBinding !== localBinding) return; const ref = buildImportReference(importData, path.node); ref.loc = path.node.loc; - if ((path.parentPath.isCallExpression({ callee: path.node }) || path.parentPath.isOptionalCallExpression({ callee: path.node }) || path.parentPath.isTaggedTemplateExpression({ tag: path.node - })) && t.isMemberExpression(ref)) { - path.replaceWith(t.sequenceExpression([t.numericLiteral(0), ref])); - } else if (path.isJSXIdentifier() && t.isMemberExpression(ref)) { + })) && isMemberExpression(ref)) { + path.replaceWith(sequenceExpression([numericLiteral(0), ref])); + } else if (path.isJSXIdentifier() && isMemberExpression(ref)) { const { object, property } = ref; - path.replaceWith(t.jsxMemberExpression(t.jsxIdentifier(object.name), t.jsxIdentifier(property.name))); + path.replaceWith(jsxMemberExpression(jsxIdentifier(object.name), jsxIdentifier(property.name))); } else { path.replaceWith(ref); } - requeueInParent(path); path.skip(); } }, - + UpdateExpression(path) { + const { + scope, + seen, + imported, + exported, + requeueInParent, + buildImportReference + } = this; + if (seen.has(path.node)) return; + seen.add(path.node); + const arg = path.get("argument"); + if (arg.isMemberExpression()) return; + const update = path.node; + if (arg.isIdentifier()) { + const localName = arg.node.name; + if (scope.getBinding(localName) !== path.scope.getBinding(localName)) { + return; + } + const exportedNames = exported.get(localName); + const importData = imported.get(localName); + if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) { + if (importData) { + path.replaceWith(assignmentExpression(update.operator[0] + "=", buildImportReference(importData, arg.node), buildImportThrow(localName))); + } else if (update.prefix) { + path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, cloneNode(update), path.scope)); + } else { + const ref = scope.generateDeclaredUidIdentifier(localName); + path.replaceWith(sequenceExpression([assignmentExpression("=", cloneNode(ref), cloneNode(update)), buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope), cloneNode(ref)])); + } + } + } + requeueInParent(path); + path.skip(); + }, AssignmentExpression: { exit(path) { const { @@ -200,63 +256,49 @@ const rewriteReferencesVisitor = { seen.add(path.node); const left = path.get("left"); if (left.isMemberExpression()) return; - if (left.isIdentifier()) { const localName = left.node.name; - if (scope.getBinding(localName) !== path.scope.getBinding(localName)) { return; } - const exportedNames = exported.get(localName); const importData = imported.get(localName); - if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) { - assert(path.node.operator === "=", "Path was not simplified"); + _assert(path.node.operator === "=", "Path was not simplified"); const assignment = path.node; - if (importData) { - assignment.left = buildImportReference(importData, assignment.left); - assignment.right = t.sequenceExpression([assignment.right, buildImportThrow(localName)]); + assignment.left = buildImportReference(importData, left.node); + assignment.right = sequenceExpression([assignment.right, buildImportThrow(localName)]); } - - path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment)); + path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment, path.scope)); requeueInParent(path); } } else { const ids = left.getOuterBindingIdentifiers(); const programScopeIds = Object.keys(ids).filter(localName => scope.getBinding(localName) === path.scope.getBinding(localName)); const id = programScopeIds.find(localName => imported.has(localName)); - if (id) { - path.node.right = t.sequenceExpression([path.node.right, buildImportThrow(id)]); + path.node.right = sequenceExpression([path.node.right, buildImportThrow(id)]); } - const items = []; programScopeIds.forEach(localName => { const exportedNames = exported.get(localName) || []; - if (exportedNames.length > 0) { - items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, t.identifier(localName))); + items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName), path.scope)); } }); - if (items.length > 0) { - let node = t.sequenceExpression(items); - + let node = sequenceExpression(items); if (path.parentPath.isExpressionStatement()) { - node = t.expressionStatement(node); + node = expressionStatement(node); node._blockHoist = path.parentPath.node._blockHoist; } - const statement = path.insertAfter(node)[0]; requeueInParent(statement); } } } - }, - "ForOfStatement|ForInStatement"(path) { const { scope, @@ -267,33 +309,42 @@ const rewriteReferencesVisitor = { } = node; const { exported, + imported, scope: programScope } = this; - - if (!t.isVariableDeclaration(left)) { - let didTransform = false; - const bodyPath = path.get("body"); - const loopBodyScope = bodyPath.scope; - - for (const name of Object.keys(t.getOuterBindingIdentifiers(left))) { - if (exported.get(name) && programScope.getBinding(name) === scope.getBinding(name)) { - didTransform = true; - - if (loopBodyScope.hasOwnBinding(name)) { - loopBodyScope.rename(name); + if (!isVariableDeclaration(left)) { + let didTransformExport = false, + importConstViolationName; + const loopBodyScope = path.get("body").scope; + for (const name of Object.keys(getOuterBindingIdentifiers(left))) { + if (programScope.getBinding(name) === scope.getBinding(name)) { + if (exported.has(name)) { + didTransformExport = true; + if (loopBodyScope.hasOwnBinding(name)) { + loopBodyScope.rename(name); + } + } + if (imported.has(name) && !importConstViolationName) { + importConstViolationName = name; } } } - - if (!didTransform) { + if (!didTransformExport && !importConstViolationName) { return; } - + path.ensureBlock(); + const bodyPath = path.get("body"); const newLoopId = scope.generateUidIdentifierBasedOnNode(left); - bodyPath.unshiftContainer("body", t.expressionStatement(t.assignmentExpression("=", left, newLoopId))); - path.get("left").replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.cloneNode(newLoopId))])); + path.get("left").replaceWith(variableDeclaration("let", [variableDeclarator(cloneNode(newLoopId))])); scope.registerDeclaration(path.get("left")); + if (didTransformExport) { + bodyPath.unshiftContainer("body", expressionStatement(assignmentExpression("=", left, newLoopId))); + } + if (importConstViolationName) { + bodyPath.unshiftContainer("body", expressionStatement(buildImportThrow(importConstViolationName))); + } } } +}; -}; \ No newline at end of file +//# sourceMappingURL=rewrite-live-references.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map new file mode 100644 index 00000000..ed02a395 --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_assert","require","_t","_template","_helperSimpleAccess","assignmentExpression","callExpression","cloneNode","expressionStatement","getOuterBindingIdentifiers","identifier","isMemberExpression","isVariableDeclaration","jsxIdentifier","jsxMemberExpression","memberExpression","numericLiteral","sequenceExpression","stringLiteral","variableDeclaration","variableDeclarator","isInType","path","parent","type","parentPath","exportKind","isStatement","isExpression","rewriteLiveReferences","programPath","metadata","imported","Map","exported","requeueInParent","requeue","source","data","localName","importName","imports","set","importsNamespace","local","exportMeta","get","push","names","rewriteBindingInitVisitorState","scope","traverse","rewriteBindingInitVisitor","bindingNames","Set","Array","from","keys","simplifyAccess","rewriteReferencesVisitorState","seen","WeakSet","buildImportReference","identNode","meta","referenced","lazy","namespace","name","interop","computed","stringSpecifiers","has","rewriteReferencesVisitor","Scope","skip","ClassDeclaration","id","node","Error","exportNames","length","statement","buildBindingExportAssignmentExpression","_blockHoist","insertAfter","VariableDeclaration","Object","forEach","localExpr","exportsObjectName","exportName","currentScope","hasOwnBinding","rename","reduce","expr","buildImportThrow","template","expression","ast","ReferencedIdentifier","add","importData","buildCodeFrameError","localBinding","getBinding","rootBinding","ref","loc","isCallExpression","callee","isOptionalCallExpression","isTaggedTemplateExpression","tag","replaceWith","isJSXIdentifier","object","property","UpdateExpression","arg","update","isIdentifier","exportedNames","operator","prefix","generateDeclaredUidIdentifier","AssignmentExpression","exit","left","assert","assignment","right","ids","programScopeIds","filter","find","items","isExpressionStatement","ForOfStatement|ForInStatement","programScope","didTransformExport","importConstViolationName","loopBodyScope","ensureBlock","bodyPath","newLoopId","generateUidIdentifierBasedOnNode","registerDeclaration","unshiftContainer"],"sources":["../src/rewrite-live-references.ts"],"sourcesContent":["import assert from \"assert\";\nimport {\n assignmentExpression,\n callExpression,\n cloneNode,\n expressionStatement,\n getOuterBindingIdentifiers,\n identifier,\n isMemberExpression,\n isVariableDeclaration,\n jsxIdentifier,\n jsxMemberExpression,\n memberExpression,\n numericLiteral,\n sequenceExpression,\n stringLiteral,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport template from \"@babel/template\";\nimport type { NodePath, Visitor, Scope } from \"@babel/traverse\";\nimport simplifyAccess from \"@babel/helper-simple-access\";\n\nimport type { ModuleMetadata } from \"./normalize-and-load-metadata\";\n\ninterface RewriteReferencesVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n imported: Map;\n buildImportReference: (\n [source, importName, localName]: readonly [string, string, string],\n identNode: t.Identifier | t.CallExpression | t.JSXIdentifier,\n ) => any;\n seen: WeakSet;\n}\n\ninterface RewriteBindingInitVisitorState {\n exported: Map;\n metadata: ModuleMetadata;\n requeueInParent: (path: NodePath) => void;\n scope: Scope;\n}\n\nfunction isInType(path: NodePath) {\n do {\n switch (path.parent.type) {\n case \"TSTypeAnnotation\":\n case \"TSTypeAliasDeclaration\":\n case \"TSTypeReference\":\n case \"TypeAnnotation\":\n case \"TypeAlias\":\n return true;\n case \"ExportSpecifier\":\n return (\n (\n path.parentPath.parent as\n | t.ExportDefaultDeclaration\n | t.ExportNamedDeclaration\n ).exportKind === \"type\"\n );\n default:\n if (path.parentPath.isStatement() || path.parentPath.isExpression()) {\n return false;\n }\n }\n } while ((path = path.parentPath));\n}\n\nexport default function rewriteLiveReferences(\n programPath: NodePath,\n metadata: ModuleMetadata,\n) {\n const imported = new Map();\n const exported = new Map();\n const requeueInParent = (path: NodePath) => {\n // Manually re-queue `exports.default =` expressions so that the ES3\n // transform has an opportunity to convert them. Ideally this would\n // happen automatically from the replaceWith above. See #4140 for\n // more info.\n programPath.requeue(path);\n };\n\n for (const [source, data] of metadata.source) {\n for (const [localName, importName] of data.imports) {\n imported.set(localName, [source, importName, null]);\n }\n for (const localName of data.importsNamespace) {\n imported.set(localName, [source, null, localName]);\n }\n }\n\n for (const [local, data] of metadata.local) {\n let exportMeta = exported.get(local);\n if (!exportMeta) {\n exportMeta = [];\n exported.set(local, exportMeta);\n }\n\n exportMeta.push(...data.names);\n }\n\n // Rewrite initialization of bindings to update exports.\n const rewriteBindingInitVisitorState: RewriteBindingInitVisitorState = {\n metadata,\n requeueInParent,\n scope: programPath.scope,\n exported, // local name => exported name list\n };\n programPath.traverse(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n rewriteBindingInitVisitor,\n rewriteBindingInitVisitorState,\n );\n\n // NOTE(logan): The 'Array.from' calls are to make this code with in loose mode.\n const bindingNames = new Set([\n ...Array.from(imported.keys()),\n ...Array.from(exported.keys()),\n ]);\n if (process.env.BABEL_8_BREAKING) {\n simplifyAccess(programPath, bindingNames);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) The third param has been removed in Babel 8.\n simplifyAccess(programPath, bindingNames, false);\n }\n\n // Rewrite reads/writes from imports and exports to have the correct behavior.\n const rewriteReferencesVisitorState: RewriteReferencesVisitorState = {\n seen: new WeakSet(),\n metadata,\n requeueInParent,\n scope: programPath.scope,\n imported, // local / import\n exported, // local name => exported name list\n buildImportReference: ([source, importName, localName], identNode) => {\n const meta = metadata.source.get(source);\n meta.referenced = true;\n\n if (localName) {\n if (meta.lazy) {\n identNode = callExpression(\n // @ts-expect-error Fixme: we should handle the case when identNode is a JSXIdentifier\n identNode,\n [],\n );\n }\n return identNode;\n }\n\n let namespace: t.Expression = identifier(meta.name);\n if (meta.lazy) namespace = callExpression(namespace, []);\n\n if (importName === \"default\" && meta.interop === \"node-default\") {\n return namespace;\n }\n\n const computed = metadata.stringSpecifiers.has(importName);\n\n return memberExpression(\n namespace,\n computed ? stringLiteral(importName) : identifier(importName),\n computed,\n );\n },\n };\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);\n}\n\n/**\n * A visitor to inject export update statements during binding initialization.\n */\nconst rewriteBindingInitVisitor: Visitor = {\n Scope(path) {\n path.skip();\n },\n ClassDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n const { id } = path.node;\n if (!id) throw new Error(\"Expected class to have a name\");\n const localName = id.name;\n\n const exportNames = exported.get(localName) || [];\n if (exportNames.length > 0) {\n const statement = expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exportNames,\n identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n },\n VariableDeclaration(path) {\n const { requeueInParent, exported, metadata } = this;\n\n Object.keys(path.getOuterBindingIdentifiers()).forEach(localName => {\n const exportNames = exported.get(localName) || [];\n\n if (exportNames.length > 0) {\n const statement = expressionStatement(\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n buildBindingExportAssignmentExpression(\n metadata,\n exportNames,\n identifier(localName),\n path.scope,\n ),\n );\n // @ts-expect-error todo(flow->ts): avoid mutations\n statement._blockHoist = path.node._blockHoist;\n\n requeueInParent(path.insertAfter(statement)[0]);\n }\n });\n },\n};\n\nconst buildBindingExportAssignmentExpression = (\n metadata: ModuleMetadata,\n exportNames: string[],\n localExpr: t.Expression,\n scope: Scope,\n) => {\n const exportsObjectName = metadata.exportName;\n for (\n let currentScope = scope;\n currentScope != null;\n currentScope = currentScope.parent\n ) {\n if (currentScope.hasOwnBinding(exportsObjectName)) {\n currentScope.rename(exportsObjectName);\n }\n }\n return (exportNames || []).reduce((expr, exportName) => {\n // class Foo {} export { Foo, Foo as Bar };\n // as\n // class Foo {} exports.Foo = exports.Bar = Foo;\n const { stringSpecifiers } = metadata;\n const computed = stringSpecifiers.has(exportName);\n return assignmentExpression(\n \"=\",\n memberExpression(\n identifier(exportsObjectName),\n computed ? stringLiteral(exportName) : identifier(exportName),\n /* computed */ computed,\n ),\n expr,\n );\n }, localExpr);\n};\n\nconst buildImportThrow = (localName: string) => {\n return template.expression.ast`\n (function() {\n throw new Error('\"' + '${localName}' + '\" is read-only.');\n })()\n `;\n};\n\nconst rewriteReferencesVisitor: Visitor = {\n ReferencedIdentifier(path) {\n const { seen, buildImportReference, scope, imported, requeueInParent } =\n this;\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const localName = path.node.name;\n\n const importData = imported.get(localName);\n if (importData) {\n if (isInType(path)) {\n throw path.buildCodeFrameError(\n `Cannot transform the imported binding \"${localName}\" since it's also used in a type annotation. ` +\n `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`,\n );\n }\n\n const localBinding = path.scope.getBinding(localName);\n const rootBinding = scope.getBinding(localName);\n\n // redeclared in this scope\n if (rootBinding !== localBinding) return;\n\n const ref = buildImportReference(importData, path.node);\n\n // Preserve the binding location so that sourcemaps are nicer.\n ref.loc = path.node.loc;\n\n if (\n (path.parentPath.isCallExpression({ callee: path.node }) ||\n path.parentPath.isOptionalCallExpression({ callee: path.node }) ||\n path.parentPath.isTaggedTemplateExpression({ tag: path.node })) &&\n isMemberExpression(ref)\n ) {\n path.replaceWith(sequenceExpression([numericLiteral(0), ref]));\n } else if (path.isJSXIdentifier() && isMemberExpression(ref)) {\n const { object, property } = ref;\n path.replaceWith(\n jsxMemberExpression(\n // @ts-expect-error todo(flow->ts): possible bug `object` might not have a name\n jsxIdentifier(object.name),\n // @ts-expect-error todo(flow->ts): possible bug `property` might not have a name\n jsxIdentifier(property.name),\n ),\n );\n } else {\n path.replaceWith(ref);\n }\n\n requeueInParent(path);\n\n // The path could have been replaced with an identifier that would\n // otherwise be re-visited, so we skip processing its children.\n path.skip();\n }\n },\n\n UpdateExpression(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n\n seen.add(path.node);\n\n const arg = path.get(\"argument\");\n\n // No change needed\n if (arg.isMemberExpression()) return;\n\n const update = path.node;\n\n if (arg.isIdentifier()) {\n const localName = arg.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n\n if (exportedNames?.length > 0 || importData) {\n if (importData) {\n path.replaceWith(\n assignmentExpression(\n update.operator[0] + \"=\",\n buildImportReference(importData, arg.node),\n buildImportThrow(localName),\n ),\n );\n } else if (update.prefix) {\n // ++foo\n // => exports.foo = ++foo\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n cloneNode(update),\n path.scope,\n ),\n );\n } else {\n // foo++\n // => (ref = i++, exports.i = i, ref)\n const ref = scope.generateDeclaredUidIdentifier(localName);\n\n path.replaceWith(\n sequenceExpression([\n assignmentExpression(\"=\", cloneNode(ref), cloneNode(update)),\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n identifier(localName),\n path.scope,\n ),\n cloneNode(ref),\n ]),\n );\n }\n }\n }\n\n requeueInParent(path);\n path.skip();\n },\n\n AssignmentExpression: {\n exit(path) {\n const {\n scope,\n seen,\n imported,\n exported,\n requeueInParent,\n buildImportReference,\n } = this;\n\n if (seen.has(path.node)) return;\n seen.add(path.node);\n\n const left = path.get(\"left\");\n\n // No change needed\n if (left.isMemberExpression()) return;\n\n if (left.isIdentifier()) {\n // Simple update-assign foo += 1; export { foo };\n // => exports.foo = (foo += 1);\n const localName = left.node.name;\n\n // redeclared in this scope\n if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {\n return;\n }\n\n const exportedNames = exported.get(localName);\n const importData = imported.get(localName);\n if (exportedNames?.length > 0 || importData) {\n assert(path.node.operator === \"=\", \"Path was not simplified\");\n\n const assignment = path.node;\n\n if (importData) {\n assignment.left = buildImportReference(importData, left.node);\n\n assignment.right = sequenceExpression([\n assignment.right,\n buildImportThrow(localName),\n ]);\n }\n\n path.replaceWith(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n assignment,\n path.scope,\n ),\n );\n requeueInParent(path);\n }\n } else {\n const ids = left.getOuterBindingIdentifiers();\n const programScopeIds = Object.keys(ids).filter(\n localName =>\n scope.getBinding(localName) === path.scope.getBinding(localName),\n );\n const id = programScopeIds.find(localName => imported.has(localName));\n\n if (id) {\n path.node.right = sequenceExpression([\n path.node.right,\n buildImportThrow(id),\n ]);\n }\n\n // Complex ({a, b, c} = {}); export { a, c };\n // => ({a, b, c} = {}), (exports.a = a, exports.c = c);\n const items: t.Expression[] = [];\n programScopeIds.forEach(localName => {\n const exportedNames = exported.get(localName) || [];\n if (exportedNames.length > 0) {\n items.push(\n buildBindingExportAssignmentExpression(\n this.metadata,\n exportedNames,\n identifier(localName),\n path.scope,\n ),\n );\n }\n });\n\n if (items.length > 0) {\n let node: t.Node = sequenceExpression(items);\n if (path.parentPath.isExpressionStatement()) {\n node = expressionStatement(node);\n // @ts-expect-error todo(flow->ts): avoid mutations\n node._blockHoist = path.parentPath.node._blockHoist;\n }\n\n const statement = path.insertAfter(node)[0];\n requeueInParent(statement);\n }\n }\n },\n },\n \"ForOfStatement|ForInStatement\"(\n path: NodePath,\n ) {\n const { scope, node } = path;\n const { left } = node;\n const { exported, imported, scope: programScope } = this;\n\n if (!isVariableDeclaration(left)) {\n let didTransformExport = false,\n importConstViolationName;\n const loopBodyScope = path.get(\"body\").scope;\n for (const name of Object.keys(getOuterBindingIdentifiers(left))) {\n if (programScope.getBinding(name) === scope.getBinding(name)) {\n if (exported.has(name)) {\n didTransformExport = true;\n if (loopBodyScope.hasOwnBinding(name)) {\n loopBodyScope.rename(name);\n }\n }\n if (imported.has(name) && !importConstViolationName) {\n importConstViolationName = name;\n }\n }\n }\n if (!didTransformExport && !importConstViolationName) {\n return;\n }\n\n path.ensureBlock();\n const bodyPath = path.get(\"body\");\n\n const newLoopId = scope.generateUidIdentifierBasedOnNode(left);\n path\n .get(\"left\")\n .replaceWith(\n variableDeclaration(\"let\", [\n variableDeclarator(cloneNode(newLoopId)),\n ]),\n );\n scope.registerDeclaration(path.get(\"left\"));\n\n if (didTransformExport) {\n bodyPath.unshiftContainer(\n \"body\",\n expressionStatement(assignmentExpression(\"=\", left, newLoopId)),\n );\n }\n if (importConstViolationName) {\n bodyPath.unshiftContainer(\n \"body\",\n expressionStatement(buildImportThrow(importConstViolationName)),\n );\n }\n }\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAmBA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,mBAAA,GAAAH,OAAA;AAAyD;EApBvDI,oBAAoB;EACpBC,cAAc;EACdC,SAAS;EACTC,mBAAmB;EACnBC,0BAA0B;EAC1BC,UAAU;EACVC,kBAAkB;EAClBC,qBAAqB;EACrBC,aAAa;EACbC,mBAAmB;EACnBC,gBAAgB;EAChBC,cAAc;EACdC,kBAAkB;EAClBC,aAAa;EACbC,mBAAmB;EACnBC;AAAkB,IAAAlB,EAAA;AA6BpB,SAASmB,QAAQA,CAACC,IAAc,EAAE;EAChC,GAAG;IACD,QAAQA,IAAI,CAACC,MAAM,CAACC,IAAI;MACtB,KAAK,kBAAkB;MACvB,KAAK,wBAAwB;MAC7B,KAAK,iBAAiB;MACtB,KAAK,gBAAgB;MACrB,KAAK,WAAW;QACd,OAAO,IAAI;MACb,KAAK,iBAAiB;QACpB,OAEIF,IAAI,CAACG,UAAU,CAACF,MAAM,CAGtBG,UAAU,KAAK,MAAM;MAE3B;QACE,IAAIJ,IAAI,CAACG,UAAU,CAACE,WAAW,CAAC,CAAC,IAAIL,IAAI,CAACG,UAAU,CAACG,YAAY,CAAC,CAAC,EAAE;UACnE,OAAO,KAAK;QACd;IACJ;EACF,CAAC,QAASN,IAAI,GAAGA,IAAI,CAACG,UAAU;AAClC;AAEe,SAASI,qBAAqBA,CAC3CC,WAAgC,EAChCC,QAAwB,EACxB;EACA,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC1B,MAAMC,QAAQ,GAAG,IAAID,GAAG,CAAC,CAAC;EAC1B,MAAME,eAAe,GAAIb,IAAc,IAAK;IAK1CQ,WAAW,CAACM,OAAO,CAACd,IAAI,C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QAAQ,CAACwC,GAAG,CAACJ,IAAI,CAAC,IAAI,CAAC0E,wBAAwB,EAAE;YACnDA,wBAAwB,GAAG1E,IAAI;UACjC;QACF;MACF;MACA,IAAI,CAACyE,kBAAkB,IAAI,CAACC,wBAAwB,EAAE;QACpD;MACF;MAEAxH,IAAI,CAAC0H,WAAW,CAAC,CAAC;MAClB,MAAMC,QAAQ,GAAG3H,IAAI,CAACwB,GAAG,CAAC,MAAM,CAAC;MAEjC,MAAMoG,SAAS,GAAGhG,KAAK,CAACiG,gCAAgC,CAAClB,IAAI,CAAC;MAC9D3G,IAAI,CACDwB,GAAG,CAAC,MAAM,CAAC,CACXqE,WAAW,CACVhG,mBAAmB,CAAC,KAAK,EAAE,CACzBC,kBAAkB,CAACb,SAAS,CAAC2I,SAAS,CAAC,CAAC,CACzC,CACH,CAAC;MACHhG,KAAK,CAACkG,mBAAmB,CAAC9H,IAAI,CAACwB,GAAG,CAAC,MAAM,CAAC,CAAC;MAE3C,IAAI+F,kBAAkB,EAAE;QACtBI,QAAQ,CAACI,gBAAgB,CACvB,MAAM,EACN7I,mBAAmB,CAACH,oBAAoB,CAAC,GAAG,EAAE4H,IAAI,EAAEiB,SAAS,CAAC,CAChE,CAAC;MACH;MACA,IAAIJ,wBAAwB,EAAE;QAC5BG,QAAQ,CAACI,gBAAgB,CACvB,MAAM,EACN7I,mBAAmB,CAACyF,gBAAgB,CAAC6C,wBAAwB,CAAC,CAChE,CAAC;MACH;IACF;EACF;AACF,CAAC"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js index 8a7042f4..e76b3fea 100644 --- a/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js +++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js @@ -4,28 +4,22 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = rewriteThis; - -var _helperReplaceSupers = require("@babel/helper-replace-supers"); - -var _traverse = _interopRequireDefault(require("@babel/traverse")); - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor"); +var _traverse = require("@babel/traverse"); +var _t = require("@babel/types"); +const { + numericLiteral, + unaryExpression +} = _t; +const rewriteThisVisitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, { + ThisExpression(path) { + path.replaceWith(unaryExpression("void", numericLiteral(0), true)); + } +}]); function rewriteThis(programPath) { (0, _traverse.default)(programPath.node, Object.assign({}, rewriteThisVisitor, { noScope: true })); } -const rewriteThisVisitor = _traverse.default.visitors.merge([_helperReplaceSupers.environmentVisitor, { - ThisExpression(path) { - path.replaceWith(t.unaryExpression("void", t.numericLiteral(0), true)); - } - -}]); \ No newline at end of file +//# sourceMappingURL=rewrite-this.js.map diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map new file mode 100644 index 00000000..402a18c7 --- /dev/null +++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_helperEnvironmentVisitor","require","_traverse","_t","numericLiteral","unaryExpression","rewriteThisVisitor","traverse","visitors","merge","environmentVisitor","ThisExpression","path","replaceWith","rewriteThis","programPath","node","Object","assign","noScope"],"sources":["../src/rewrite-this.ts"],"sourcesContent":["import environmentVisitor from \"@babel/helper-environment-visitor\";\nimport traverse from \"@babel/traverse\";\nimport { numericLiteral, unaryExpression } from \"@babel/types\";\n\nimport type { NodePath, Visitor } from \"@babel/traverse\";\n\n/**\n * A visitor to walk the tree, rewriting all `this` references in the top-level scope to be\n * `void 0` (undefined).\n */\nconst rewriteThisVisitor: Visitor = traverse.visitors.merge([\n environmentVisitor,\n {\n ThisExpression(path) {\n path.replaceWith(unaryExpression(\"void\", numericLiteral(0), true));\n },\n },\n]);\n\nexport default function rewriteThis(programPath: NodePath) {\n // Rewrite \"this\" to be \"undefined\".\n traverse(programPath.node, { ...rewriteThisVisitor, noScope: true });\n}\n"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAF,OAAA;AAA+D;EAAtDG,cAAc;EAAEC;AAAe,IAAAF,EAAA;AAQxC,MAAMG,kBAA2B,GAAGC,iBAAQ,CAACC,QAAQ,CAACC,KAAK,CAAC,CAC1DC,iCAAkB,EAClB;EACEC,cAAcA,CAACC,IAAI,EAAE;IACnBA,IAAI,CAACC,WAAW,CAACR,eAAe,CAAC,MAAM,EAAED,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;EACpE;AACF,CAAC,CACF,CAAC;AAEa,SAASU,WAAWA,CAACC,WAAqB,EAAE;EAEzD,IAAAR,iBAAQ,EAACQ,WAAW,CAACC,IAAI,EAAAC,MAAA,CAAAC,MAAA,KAAOZ,kBAAkB;IAAEa,OAAO,EAAE;EAAI,EAAE,CAAC;AACtE"} \ No newline at end of file diff --git a/node_modules/@babel/helper-module-transforms/package.json b/node_modules/@babel/helper-module-transforms/package.json index f21533e1..178adff2 100644 --- a/node_modules/@babel/helper-module-transforms/package.json +++ b/node_modules/@babel/helper-module-transforms/package.json @@ -1,59 +1,31 @@ { - "_from": "@babel/helper-module-transforms@^7.13.14", - "_id": "@babel/helper-module-transforms@7.13.14", - "_inBundle": false, - "_integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", - "_location": "/@babel/helper-module-transforms", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-module-transforms@^7.13.14", - "name": "@babel/helper-module-transforms", - "escapedName": "@babel%2fhelper-module-transforms", - "scope": "@babel", - "rawSpec": "^7.13.14", - "saveSpec": null, - "fetchSpec": "^7.13.14" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "_shasum": "e600652ba48ccb1641775413cb32cfa4e8b495ef", - "_spec": "@babel/helper-module-transforms@^7.13.14", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/core", - "author": { - "name": "Logan Smyth", - "email": "loganfsmyth@gmail.com" - }, - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" - }, - "deprecated": false, + "name": "@babel/helper-module-transforms", + "version": "7.22.1", "description": "Babel helper functions for implementing ES6 module transformations", + "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-helper-module-transforms", "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-module-transforms", "publishConfig": { "access": "public" }, "repository": { "type": "git", - "url": "git+https://github.com/babel/babel.git", + "url": "https://github.com/babel/babel.git", "directory": "packages/babel-helper-module-transforms" }, - "version": "7.13.14" -} + "main": "./lib/index.js", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.1", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.21.9", + "@babel/traverse": "^7.22.1", + "@babel/types": "^7.22.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-optimise-call-expression/README.md b/node_modules/@babel/helper-optimise-call-expression/README.md deleted file mode 100644 index 3fdbc9bf..00000000 --- a/node_modules/@babel/helper-optimise-call-expression/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-optimise-call-expression - -> Helper function to optimise call expression - -See our website [@babel/helper-optimise-call-expression](https://babeljs.io/docs/en/babel-helper-optimise-call-expression) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-optimise-call-expression -``` - -or using yarn: - -```sh -yarn add @babel/helper-optimise-call-expression --dev -``` diff --git a/node_modules/@babel/helper-optimise-call-expression/lib/index.js b/node_modules/@babel/helper-optimise-call-expression/lib/index.js deleted file mode 100644 index 0751eb3c..00000000 --- a/node_modules/@babel/helper-optimise-call-expression/lib/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = optimiseCallExpression; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function optimiseCallExpression(callee, thisNode, args, optional) { - if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, { - name: "arguments" - })) { - if (optional) { - return t.optionalCallExpression(t.optionalMemberExpression(callee, t.identifier("apply"), false, true), [thisNode, args[0].argument], false); - } - - return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]); - } else { - if (optional) { - return t.optionalCallExpression(t.optionalMemberExpression(callee, t.identifier("call"), false, true), [thisNode, ...args], false); - } - - return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode, ...args]); - } -} \ No newline at end of file diff --git a/node_modules/@babel/helper-optimise-call-expression/package.json b/node_modules/@babel/helper-optimise-call-expression/package.json deleted file mode 100644 index c78512f0..00000000 --- a/node_modules/@babel/helper-optimise-call-expression/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_from": "@babel/helper-optimise-call-expression@^7.12.13", - "_id": "@babel/helper-optimise-call-expression@7.12.13", - "_inBundle": false, - "_integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", - "_location": "/@babel/helper-optimise-call-expression", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@babel/helper-optimise-call-expression@^7.12.13", - "name": "@babel/helper-optimise-call-expression", - "escapedName": "@babel%2fhelper-optimise-call-expression", - "scope": "@babel", - "rawSpec": "^7.12.13", - "saveSpec": null, - "fetchSpec": "^7.12.13" - }, - "_requiredBy": [ - "/@babel/helper-replace-supers" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "_shasum": "5c02d171b4c8615b1e7163f888c1c81c30a2aaea", - "_spec": "@babel/helper-optimise-call-expression@^7.12.13", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@babel/helper-replace-supers", - "bugs": { - "url": "https://github.com/babel/babel/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@babel/types": "^7.12.13" - }, - "deprecated": false, - "description": "Helper function to optimise call expression", - "devDependencies": { - "@babel/generator": "7.12.13", - "@babel/parser": "7.12.13" - }, - "homepage": "https://babel.dev/docs/en/next/babel-helper-optimise-call-expression", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-optimise-call-expression", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/babel/babel.git", - "directory": "packages/babel-helper-optimise-call-expression" - }, - "version": "7.12.13" -} diff --git a/node_modules/@babel/helper-plugin-utils/README.md b/node_modules/@babel/helper-plugin-utils/README.md index 54975ea7..c17852d3 100644 --- a/node_modules/@babel/helper-plugin-utils/README.md +++ b/node_modules/@babel/helper-plugin-utils/README.md @@ -9,11 +9,11 @@ See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/babel-he Using npm: ```sh -npm install --save-dev @babel/helper-plugin-utils +npm install --save @babel/helper-plugin-utils ``` or using yarn: ```sh -yarn add @babel/helper-plugin-utils --dev +yarn add @babel/helper-plugin-utils ``` diff --git a/node_modules/@babel/helper-plugin-utils/lib/index.js b/node_modules/@babel/helper-plugin-utils/lib/index.js index 0ba1be02..bad40f8a 100644 --- a/node_modules/@babel/helper-plugin-utils/lib/index.js +++ b/node_modules/@babel/helper-plugin-utils/lib/index.js @@ -4,87 +4,78 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.declare = declare; - +exports.declarePreset = void 0; +const apiPolyfills = { + assertVersion: api => range => { + throwVersionError(range, api.version); + } +}; +{ + Object.assign(apiPolyfills, { + targets: () => () => { + return {}; + }, + assumption: () => () => { + return undefined; + } + }); +} function declare(builder) { return (api, options, dirname) => { var _clonedApi2; - let clonedApi; - for (const name of Object.keys(apiPolyfills)) { var _clonedApi; - if (api[name]) continue; - clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api); + (_clonedApi = clonedApi) != null ? _clonedApi : clonedApi = copyApiObject(api); clonedApi[name] = apiPolyfills[name](clonedApi); } - return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname); }; } - -const apiPolyfills = { - assertVersion: api => range => { - throwVersionError(range, api.version); - }, - targets: () => () => { - return {}; - }, - assumption: () => () => {} -}; - +const declarePreset = declare; +exports.declarePreset = declarePreset; function copyApiObject(api) { let proto = null; - if (typeof api.version === "string" && /^7\./.test(api.version)) { proto = Object.getPrototypeOf(api); - if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) { proto = null; } } - return Object.assign({}, proto, api); } - function has(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } - function throwVersionError(range, version) { if (typeof range === "number") { if (!Number.isInteger(range)) { throw new Error("Expected string or integer value."); } - range = `^${range}.0.0-0`; } - if (typeof range !== "string") { throw new Error("Expected string or integer value."); } - const limit = Error.stackTraceLimit; - if (typeof limit === "number" && limit < 25) { Error.stackTraceLimit = 25; } - let err; - if (version.slice(0, 2) === "7.") { err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`); } else { 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; } - throw Object.assign(err, { code: "BABEL_VERSION_UNSUPPORTED", version, range }); -} \ No newline at end of file +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-plugin-utils/lib/index.js.map b/node_modules/@babel/helper-plugin-utils/lib/index.js.map new file mode 100644 index 00000000..e8343c4c --- /dev/null +++ b/node_modules/@babel/helper-plugin-utils/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["apiPolyfills","assertVersion","api","range","throwVersionError","version","Object","assign","targets","assumption","undefined","declare","builder","options","dirname","_clonedApi2","clonedApi","name","keys","_clonedApi","copyApiObject","declarePreset","exports","proto","test","getPrototypeOf","has","obj","key","prototype","hasOwnProperty","call","Number","isInteger","Error","limit","stackTraceLimit","err","slice","code"],"sources":["../src/index.ts"],"sourcesContent":["import type {\n PluginAPI,\n PluginObject,\n PluginPass,\n PresetAPI,\n PresetObject,\n} from \"@babel/core\";\n\ntype APIPolyfillFactory = (\n api: PluginAPI,\n) => PluginAPI[T];\n\ntype APIPolyfills = {\n assertVersion: APIPolyfillFactory<\"assertVersion\">;\n};\n\nconst apiPolyfills: APIPolyfills = {\n // Not supported by Babel 7 and early versions of Babel 7 beta.\n // It's important that this is polyfilled for older Babel versions\n // since it's needed to report the version mismatch.\n assertVersion: (api: PluginAPI) => (range: number | string) => {\n throwVersionError(range, api.version);\n },\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(apiPolyfills, {\n // This is supported starting from Babel 7.13\n targets: () => () => {\n return {};\n },\n // This is supported starting from Babel 7.13\n assumption: () => () => {\n return undefined;\n },\n });\n}\n\nexport function declare(\n builder: (\n api: PluginAPI,\n options: Option,\n dirname: string,\n ) => PluginObject,\n): (\n api: PluginAPI,\n options: Option,\n dirname: string,\n) => PluginObject {\n return (api, options: Option, dirname: string) => {\n let clonedApi: PluginAPI;\n\n for (const name of Object.keys(\n apiPolyfills,\n ) as (keyof typeof apiPolyfills)[]) {\n if (api[name]) continue;\n\n clonedApi ??= copyApiObject(api);\n clonedApi[name] = apiPolyfills[name](clonedApi);\n }\n\n // @ts-expect-error options || {} may not be assigned to Options\n return builder(clonedApi ?? api, options || {}, dirname);\n };\n}\n\nexport const declarePreset = declare as